Commit Graph

19 Commits

Author SHA1 Message Date
Oliver Stöneberg 5a322365a6
fixed `scriptcheck.yml` (#5268) 2023-08-01 13:06:12 +02:00
Daniel Marjamäki 9c5275f514
misra: fix 9.x checking when string literals are used to initialize char arrays (#5234) 2023-07-11 17:57:55 +02:00
Daniel Marjamäki 80c42fcaf3
misra: Fix crash in misra_9.py when struct type is unknown and there is string initialization (#5233) 2023-07-11 13:40:19 +02:00
Daniel Marjamäki a04990d4e3
misra 9.2: do not crash when checking. string literal is allowed to initialize array member. (#5232) 2023-07-10 22:50:24 +02:00
Daniel Marjamäki 2cd1f0f387
misra: Fix crash in misra_9x when there is unknown constant used as array size (#5229) 2023-07-10 12:25:28 +02:00
Daniel Marjamäki 276aace331
Misra: Fix crash (#5228) 2023-07-09 19:17:59 +02:00
Daniel Marjamäki 260a214ef1
Fix #11812 (Crash: misra addon, infinite recursion) (#5207) 2023-07-04 04:11:03 +02:00
Daniel Marjamäki 91dedf05b5
Fix #11793 (False positive: Misra addon crash for struct initialization when struct has a function pointer array) (#5190) 2023-06-25 11:37:49 +02:00
Daniel Marjamäki 4cf9a704b4
Fixed #11707 (False positive: misra 9.3 partial array initializations) (#5034) 2023-05-05 17:22:58 +02:00
Daniel Marjamäki 8dbc1b802a misra: fix crash 2022-05-17 22:15:49 +02:00
PeterSchops 7199dde161
Fix issue in misra 9 x (#3409) 2021-08-21 22:01:24 +02:00
Georgiy Komarov 79f59d8f39
misra: Fixed crash with struct fields with unknown types on 9.x rules (#3305)
This fixes the crash on with struct fields containing unknown types
reported on the forum:
https://sourceforge.net/p/cppcheck/discussion/general/thread/d64551cc55/#5f0f

The suggested patch doesn't handle the cases when there are struct
fields with arrays containing unknown types. So the addon will not
generate warnings in these cases. The problem is that Cppcheck doesn't
generate valueType-pointer information for unknown types in the dump
file. When adding this in symboldatabase.cpp, MISRA addon will generate
a lot of false positives because we depend on the null value of
valueType.

So I suppose it better to left this as is, to don't break the addon for
such rare cases.
2021-06-24 08:29:27 +02:00
Ivar Andreas Bonsaksen dc582560cc
Add default parameter to next() to prevent StopIteration exception when no corresponding rawToken is found for '[' token (#3301)
Co-authored-by: Ivar Bonsaksen <ivar.bonsaksen@microchip.com>
2021-06-19 20:24:21 +02:00
Ivar Andreas Bonsaksen e3b7ceec7e
Fix issue where misra 9_x evaluation crashes on some undefined structs with nested initialisers (#3290) 2021-06-04 17:19:40 +02:00
Georgiy Komarov 390a5af064
misra.py: Fix crashes on obsolete GCC syntax for struct initialization (#3175)
* misra.py: Fix crashes on obsolete GCC syntax for struct initialization

* Added expected violations
2021-03-20 13:59:39 +01:00
Oliver Stöneberg b472b4e65d
some Python cleanups based on PyCharm inspections (#2999)
* some Python cleanups based on PyCharm inspections

* test-helloworld.py: adjusted assert in test_addon_relative_path()
2021-01-31 14:27:11 +01:00
Georgiy Komarov 82f51bd523
misra: Fix crash on rule 9.x (#3024)
Closes ticket #10084
2021-01-07 15:04:12 +01:00
kskjerve c22290f5a3
Fix #10043 unexpected designator (#2966) 2020-12-21 13:25:41 +01:00
kskjerve d4860f500a
MISRA 9.2 to 9.5 (#2954) 2020-12-16 17:28:54 +01:00