-
Notifications
You must be signed in to change notification settings - Fork 683
Remove cppcheck and vera++ from prerequisites #872
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
Remove cppcheck and vera++ from prerequisites #872
Conversation
@@ -1,3 +1,4 @@ | |||
operatorEqVarError | |||
noConstructor | |||
duplicateExpression | |||
variableScope |
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.
Are you sure suppressing all of the variable scope expressions is a good idea? What is the style issue in ecma/builtin-objects/ecma-builtin-helpers.cpp?
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.
That's the ID cppcheck reported for the error when running with --xml. I couldn't find any detailed description of the error, nor how many checks this suppression would turn off.
In function ecma_builtin_helper_object_to_string
the following is reported:
[jerry-core/ecma/builtin-objects/ecma-builtin-helpers.cpp:87]: (style) The scope of the variable 'buffer_size' can be reduced.
But I couldn't find any way to get rid of the error (moved the declaration earlier, moved a var declaration between the declaration of buffer_size
az the local array allocation, removed the const specifier, etc.). Anyway, they would only have been hacks. Working around false positives of a static checker cannot be the motivation for refactoring the code so I dropped that idea and suppressed the error ID.
Not sure about alternatives.
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 checked and you are right. This is definitely a false positive. I actually like the variable scope check, so I'd like to keep it. If there is only one false positive then we can suppress only that with a //cppcheck-suppress variableScope
comment in the previous line (jerry-core/ecma/builtin-objects/ecma-builtin-helpers.cpp:86). Could you try it?
Please update the copyright in the touched files. |
Please update |
583d60b
to
9c4187e
Compare
Updated according to the review, and rebased to current master. |
Rely on platform-provided versions. Thus, no need to download and build them, neither to wrap them with shell scripts. CMake and precommit updated to call the new tools. Development documentation also updated/simplified. PS: On my Ubuntu 14.04.3, cppcheck has version 1.61, while prereq version was 1.69. The older version reports and fails on a strange style issue in ecma/builtin-objects/ecma-builtin-helpers.cpp, for which the only solution found was to suppress the cppcheck errors with `variableScope` id for that file. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
9c4187e
to
20bec3d
Compare
Restricted the error suppression to the file with the false positive. Updated & rebased. |
LGTM |
Rely on platform-provided versions. Thus, no need to download and
build them, neither to wrap them with shell scripts. CMake and
precommit updated to call the new tools.
PS: On my Ubuntu 14.04.3, cppcheck has version 1.61, while prereq
version was 1.69. The older version reports and fails on a strange
style issue in ecma/builtin-objects/ecma-builtin-helpers.cpp, for
which the only solution found was to suppress cppcheck errors with
variableScope
id.JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
resolves #844