-
Notifications
You must be signed in to change notification settings - Fork 0
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
Allow empty statements in switch #13
Conversation
is there a code example for this? |
From
|
that looks like it's just bad code... I wouldn't accept that... people shouldn't check-in nonsense like that. |
I agree it's bad code, but it compiles. And the server code exciser fails to parse it... so it's not even treated as an error. The file is skipped. So this missmatch betwen compiler and "server scope linter" can be bad. We also have this one in
Thaw will force us to add empty statements for any labeled case statement. I will try to solve it this same PR... as probably one modification affects the other. |
The other option is two modify all those switch statements to make them good and don't modify the grammar. But then, maybe, we don't notice that people is submitting more code like that in other parts and we have more files skipping checks because of not being able to parse them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point here @arturjpv. The current code is syntactically valid despite how poor practice it may be. For me this is a 'lgtm' based on the premise that this tool is not a linter, and that this kind of coding style issue should probably be solved with compiler warning flags or other tooling.
Allow empty statements in
switch
.