-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add missing STD Library Identifiers #7325
Conversation
75edd8c
to
a5a449b
Compare
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.
hmm.. some tests would be nice. Do you have some idea? I don't feel we need to test this in full but some kind of generic tests would be nice.. maybe ensure C11_STDLIB_IDENTIFIERS
extends C99_STDLIB_IDENTIFIERS
, make a few isStdLibId
calls to make sure it works, ..
@danmar Test suggestions sound good, I can add that. is there already a test file where the misra.py is „unit tested“? I only found the .c file which tests the detections. If yes could you link the file where I should add it, if no could you make a suggestion how you would like to have the test added? with test suggestions I don’t have additional ideas, the thing is it’s only a big list of keywords so there is not much to test, apart of the suggestions you already mentioned. |
@danmar added a Test and also checked the isKeyword additionally to isStdLib and fixed a typo there, too. If it is fine from your side it can be merged. |
@wienans thanks! I wonder, is your name added in https://github.com/danmar/cppcheck/blob/main/AUTHORS yet? |
@danmar actually no i am not in it. You can add me as Sven Wienand |
Added a STDLIB_IDENTIFIERS for C11 as well as updated the C99 once based on,
C99: https://www.dii.uchile.cl/~daespino/files/Iso_C_1999_definition.pdf
C11: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
in the misra.py