-
Notifications
You must be signed in to change notification settings - Fork 31
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
Style50 counts header comments as lines of code, but not as comments #76
Comments
Ooh actually this is sort of two issues in one. The way
Regexes are probably ill-suited for this task. I may just need to use a C parser |
Encountered a problem where the program said to remove 4 spaces from two line of code. However, removing those spaces would make the code worse. |
@cmlsharp Suppose the single |
@Rohitth007 yep, that's a flaw for sure. It doesn't impact grading at all, but there are cases in which writing a multi-line comment as opposed to a single line comment would cause the warning to be displayed. For example:
yields the "But consider adding more comments" message but
does not. This could be fixed by having the C StyleCheck class override |
The right solution to this and the original issue is to use a lexer like Pygments to implement these normalization steps (ideally in a language agnostic way instead of leaving |
@cmlsharp Instead of counting a multi-line comment as a single line, isn't counting an n-line comment as n comments, by changing |
This overly commented snippet of code needs more comments according to style50.
Apparently removing the header comment fixes the issue?
The text was updated successfully, but these errors were encountered: