I've downloaded the latest cppcheck 1.88 and given
make MATCHCOMPILER=yes CFGDIR=cfg HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function"
when i tried to check misra compliance for my library code it returned this error
Traceback (most recent call last):
File "misra.py", line 2456, in <module>
main()
File "misra.py", line 2399, in main
checker.parseDump(item)
File "misra.py", line 2232, in parseDump
self.misra_5_3(cfg)
File "misra.py", line 785, in misra_5_3
num_sign_chars = self.get_num_significant_naming_chars(data)
File "misra.py", line 672, in get_num_significant_naming_chars
if cfg.standards and cfg.standards.c == "c99":
AttributeError: Configuration instance has no attribute 'standards'</module>
Last edit: B Dharma 2019-07-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Could it be that the .dump files were generated with an older Cppcheck version? Saving the standard in the .dump files is relatively new. So maybe it works after recreating the .dump files with a new Cppcheck version.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
How to overcome this error ?
I've downloaded the latest cppcheck 1.88 and given
make MATCHCOMPILER=yes CFGDIR=cfg HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function"
when i tried to check misra compliance for my library code it returned this error
Traceback (most recent call last):
File "misra.py", line 2456, in <module>
main()
File "misra.py", line 2399, in main
checker.parseDump(item)
File "misra.py", line 2232, in parseDump
self.misra_5_3(cfg)
File "misra.py", line 785, in misra_5_3
num_sign_chars = self.get_num_significant_naming_chars(data)
File "misra.py", line 672, in get_num_significant_naming_chars
if cfg.standards and cfg.standards.c == "c99":
AttributeError: Configuration instance has no attribute 'standards'</module>
Last edit: B Dharma 2019-07-17
Could it be that the .dump files were generated with an older Cppcheck version? Saving the standard in the .dump files is relatively new. So maybe it works after recreating the .dump files with a new Cppcheck version.