-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
nxstyle: Suppress checking in strings/comments. #387
Labels
Type: Bug
Something isn't working
Comments
yamt
added a commit
to yamt/incubator-nuttx
that referenced
this issue
Nov 25, 2020
The following nxstyle error is a false positive. apache#387 fs/nfs/nfs_util.c:70:39: error: C++ style comment
yamt
added a commit
to yamt/incubator-nuttx
that referenced
this issue
Nov 25, 2020
The following nxstyle error is a false positive. apache#387 fs/nfs/nfs_util.c:70:39: error: C++ style comment
xiaoxiang781216
pushed a commit
that referenced
this issue
Nov 25, 2020
The following nxstyle error is a false positive. #387 fs/nfs/nfs_util.c:70:39: error: C++ style comment
yamt
added a commit
to yamt/incubator-nuttx-apps
that referenced
this issue
May 7, 2021
The following errors are false positives. apache/nuttx#387 ``` /Users/yamamoto/git/nuttx/apps/netutils/netlib/netlib_parseurl.c:57:13: error: C++ style comment /Users/yamamoto/git/nuttx/apps/netutils/netlib/netlib_parseurl.c:59:35: error: C++ style comment ```
xiaoxiang781216
pushed a commit
to apache/nuttx-apps
that referenced
this issue
May 8, 2021
The following errors are false positives. apache/nuttx#387 ``` /Users/yamamoto/git/nuttx/apps/netutils/netlib/netlib_parseurl.c:57:13: error: C++ style comment /Users/yamamoto/git/nuttx/apps/netutils/netlib/netlib_parseurl.c:59:35: error: C++ style comment ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nxstyle does not detect when it is within a string and will report crazy things because it is parsing the strng content. For example, if the string contains "Hello", nxstyle would probleam complain about mixed case identifiers, if the strong contains "https://", it would probably complete about C++ style comments. If the string contains "yes/no" it would probably complain about missing spaces before and after an operator.
Below is a even more obsure false alarm example:
junk.c:
then you see:
In this case, nxstyle should ignore the ',' characters is within a string.
Most of this also applies to comments. You will see the same kinds of errors for similer sub-strings within a comment. nxstyle does detect that it is within a comment, however, it does not use that information to suppress certain error reports.
The text was updated successfully, but these errors were encountered: