Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SA5008: check for missing closing quote #1517

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nanzhong
Copy link

@nanzhong nanzhong commented Apr 8, 2024

This PR attempts to address handling the missing closing quote case for the struct tag parser.

I could be naive here, but changing the current implementation of the scanner from breaking when it's unable to find the closing double quote to returning an error would achieve this. This does the change the behaviour to now ignore partially valid tags (i.e. `xml:"complete" json:"missing` would no longer result in the xml:"complete" being checked), instead it will highlight the missing closing quote violation.

I'm not familiar with the intended testdata organization, so I've proposed a test case for this under the example.com/CheckStructTags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant