Hello, I'm seeing an issue with suppressing MISRA rule 17.8. I'm using cppcheck 2.3 with the latest pull of main (SHA: 0338e99f84bceaab75cf9dd321d3e85a2935b0d3)
one example:
Bailing out from checking ..\Sources\mcal\mcalUart.c since there was an internal error: Failed to execute 'python "C:\Program Files\Cppcheck\addons\misra.py" --cli --rule-texts=../postbuild/cppcheck/misra_rules.txt --suppress-rules 17.8 ..\Sources\mcal\mcalUart.c.dump'. Traceback (most recent call last): File "C:\Program Files\Cppcheck\addons\misra.py", line 3348, in <module> main() File "C:\Program Files\Cppcheck\addons\misra.py", line 3292, in main checker.parseDump(item) File "C:\Program Files\Cppcheck\addons\misra.py", line 3126, in parseDump self.executeCheck(905, self.misra_9_5, cfg, data.rawTokens) File "C:\Program Files\Cppcheck\addons\misra.py", line 3073, in executeCheck check_function(*args) File "C:\Program Files\Cppcheck\addons\misra.py", line 1508, in misra_9_5 misra_9.misra_9_x(self, data, 905, rawTokens) File "C:\Program Files\Cppcheck\addons\misra_9.py", line 403, in misra_9_x ed = getElementDef(nameToken, rawTokens) File "C:\Program Files\Cppcheck\addons\misra_9.py", line 418, in getElementDef createArrayChildrenDefs(ed, nameToken.astParent, rawTokens) File "C:\Program Files\Cppcheck\addons\misra_9.py", line 429, in createArrayChildrenDefs foundToken = next(rawToken for rawToken in rawTokens if rawToken.file == token.file and rawToken.linenr == token.linenr and rawToken.column == token.column) StopIteration
Attached is the dump file and source.
Funny thing is I did a pull maybe 1 or 2 weeks ago and I didn't see this issue back then.
Thank you, Amir
No, I can't reproduce this too. Please check your Cppcheck installation: https://sourceforge.net/p/cppcheck/discussion/general/thread/d0a109d572/#3ac5/d67b .
Log in to post a comment.
Hello,
I'm seeing an issue with suppressing MISRA rule 17.8. I'm using cppcheck 2.3 with the latest pull of main (SHA: 0338e99f84bceaab75cf9dd321d3e85a2935b0d3)
one example:
Attached is the dump file and source.
Funny thing is I did a pull maybe 1 or 2 weeks ago and I didn't see this issue back then.
Thank you,
Amir
No, I can't reproduce this too. Please check your Cppcheck installation: https://sourceforge.net/p/cppcheck/discussion/general/thread/d0a109d572/#3ac5/d67b .