I am seeing the following error. Can anyone explain this?
Bailingoutfromcheckingsrc/comms/can.csincetherewasaninternalerror:Failedtoexecute'python3 /usr/local/share/Cppcheck/addons/runaddon.py /usr/local/share/Cppcheck/addons/misra.py --cli --rule-texts=MISRAC2012e3r1-yqmeto-1-utv3v9_Rules.txt src/comms/can.c.dump'.{"file":"src/comms/can.c","linenr":358,"column":1,"severity":"style","message":"The character sequences /* and // shall not be used within a comment","addon":"misra","errorId":"c2012-3.1","extra":"Required"}.{"file":"src/comms/can.c","linenr":45,"column":42,"severity":"style","message":"A string literal shall not be assigned to an object unless the object\u2019s type is \u201cpointer to const-qualified char\u201d","addon":"misra","errorId":"c2012-7.4","extra":"Required"}\012{"file":"src/comms/can.c","linenr":48,"column":27,"severity":"style","message":"A string literal shall not be assigned to an object unless the object\u2019s type is \u201cpointer to const-qualified char\u201d","addon":"misra","errorId":"c2012-7.4","extra":"Required"}\012{"file":"src/comms/can.c","linenr":152,"column":51,"severity":"style","message":"A string literal shall not be assigned to an object unless the object\u2019s type is \u201cpointer to const-qualified char\u201d","addon":"misra","errorId":"c2012-7.4","extra":"Required"}\012{"file":"src/comms/can.c","linenr":266,"column":51,"severity":"style","message":"A string literal shall not be assigned to an object unless the object\u2019s type is \u201cpointer to const-qualified char\u201d","addon":"misra","errorId":"c2012-7.4","extra":"Required"}\012Traceback(mostrecentcalllast):\012File"/usr/local/share/Cppcheck/addons/runaddon.py",line8,in\012runpy.run_path(addon,run_name='__main__')\012File"/usr/lib/python3.8/runpy.py",line265,inrun_path\012return_run_module_code(code,init_globals,run_name,\012File"/usr/lib/python3.8/runpy.py",line97,in_run_module_code\012_run_code(code,mod_globals,init_globals,\012File"/usr/lib/python3.8/runpy.py",line87,in_run_code\012exec(code,run_globals)\012File"/usr/local/share/Cppcheck/addons/misra.py",line4681,in\012main()\012File"/usr/local/share/Cppcheck/addons/misra.py",line4623,inmain\012checker.parseDump(item)\012File"/usr/local/share/Cppcheck/addons/misra.py",line4278,inparseDump\012self.executeCheck(704,self.misra_7_4,cfg)\012File"/usr/local/share/Cppcheck/addons/misra.py",line4206,inexecuteCheck\012check_function(*args)\012File"/usr/local/share/Cppcheck/addons/misra.py",line1840,inmisra_7_4\012ifusedParameter.isStringandparameterDefinition.nameToken:\012AttributeError:'NoneType'objecthasnoattribute'nameToken'
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am seeing the following error. Can anyone explain this?
Do you have python3 installed?? It used to be running python before. But that fails on system that does not default to python3.
I don't think it is a python version problem.
Which cppcheck version is it? Can you reproduce with latest cppcheck-2.8?
Same issue here.
I installed python 3.11 and use Cppcheck 2.12.0
How to proceed?