Commit Graph

26 Commits

Author SHA1 Message Date
tx_haggis 294f537cd2
Fix command line for cppcheck v11 (#1099) 2023-09-18 15:39:20 +10:00
tx_haggis f71b7e50e2
Suppress 5.8 & 8.6 (#975)
As of cppcheck 2.9, these checks produce too many false positives
They do not account for class scope.
E.g. class1::method1==class2::method1
2023-05-04 10:14:57 +10:00
tx_haggis 8888e06e7f
MISRA check: add XML output (#967)
* MISRA check: add XML output

* Improve handling of cppcheck output

* Simplify - make cppcheck do more work
Now need for the script to gather source files
and run them one at a time, or flatten xml etc.

* Define the byte type - flushes out violations.

* Precaution: apply dos2unix before invoking shell script

* Restore force rename of libdivide folder
Scans on Windows Git Bash were taking way too long.

* Performance: run as many cppcheck jobs as possible
Logical CPU count - 1

* Set the build dir
Prevents temp files being left in the source tree
2023-01-01 10:25:59 +09:00
Josh Stewart 2fc29ceef5 MISRA cleanup rule: misra-c2012-8.2 2022-11-06 09:43:29 +11:00
tx_haggis b8278e7ecb
Include CPP files in MISRA script (#925)
* Push libdivide #def into build flags

* Allow build without USE_LIBDIVIDE

* Rename libdivide folder before & after scan

It's the only way to really exclude it
2022-09-15 12:16:14 +10:00
Josh Stewart 7eee585f6b Accurate MISRA scanning for all rules now in place 2022-09-08 12:57:05 +10:00
Josh Stewart cf45e6c289
Migrate MISRA scanning to Github Actions + Update to cppcheck v2.7 (#923)
* Initial creation of test action

* Fix relative directory

* Change to cppcheck v2.7

* Change script call

* Direct error count into file

* Fix env writing

* env update

* More env testing

* Another env test

* More testing

* More testing

* Yet more env testing

* Change to results count file

* Further testing

* Remove continue on error

* Force script to complete successfully

* Force create results dir

* Force set results directory

* Fix bad syntax

* Add badge to README

* Remove Azure pipelines

* Re-add cat of results file

* Add quiet option to script

* Add back missing line
2022-09-07 16:04:51 +10:00
adbancroft 690529637a
refactor: parameterize the MISRA checking script (#507)
* refactor: parameterize the MISRA checking script

The script contained hardcoded paths, which made it difficult
to use as part of the development workflow.

* ci!: use script relative path to pick source folder

* ci!: default output folder within source tree

* refactor: have cppcheck run the misra script

* refactor: use "rm -f" - remove existence check

* refactor: encapsulate into functions

* ci!: merge git MISRA logic into check_misra.sh

* ci!: count true errors, not style violations

* ci: use common MISRA check script

Co-authored-by: adbancroft <adbancroft@users.noreply.github.com>
2021-01-25 09:56:37 +11:00
Josh Stewart 899831bdad MISRA cleanup 2020-07-30 09:15:24 +10:00
Josh Stewart df22b1d41b MISRA cleanup 2019-12-02 14:47:30 +11:00
Bruno Bousquet f1521b65d8 Fix MISRA violations (#268)
* improve misra checking

* fix 1600 misra violations

* fix mistyped pointer

* misra script was not filtering duplicates
2019-10-22 11:49:07 +10:00
Josh Stewart 186ca9e468 Signatures and base tunes for 201909 release 2019-09-05 12:02:15 +10:00
Josh Stewart 358c50e9ea First of the big MISRA cleanups 2019-06-26 10:31:35 +10:00
Josh Stewart 55537a447a Fix incorrect cppcheck path 2019-06-25 18:39:15 +10:00
Josh Stewart f84583d4bb Switch to latest version of cppcheck and MISRA scan 2019-06-25 18:27:54 +10:00
Josh Stewart 90de9d06f8 Some work on moving towards to the new cppcheck MISRA scanner 2019-01-23 12:05:14 +13:00
Josh Stewart ef1fdc3a25 Minor MISRA cleanup (Will still fail) 2019-01-21 17:50:50 +13:00
Josh Stewart 3efb6abb9e Minor misra text update 2018-11-05 16:30:53 +11:00
Josh Stewart 79a25673f8 Improvements to the MISRA checking process 2018-09-03 17:16:52 +10:00
Josh Stewart c0cf1c5119 MISRA cleanup 2018-04-25 08:00:16 +10:00
Vitor Moreno B. Sales 17a551d89b
Merge pull request #18 from noisymime/master
Early March Sync
2018-03-16 22:17:54 -03:00
Josh Stewart f39d425daf Update MISRA script to traverse all #ifdef paths 2018-02-12 10:45:17 +11:00
VitorBoss fb3c345f23 Merge remote-tracking branch 'refs/remotes/noisymime/master' 2017-08-02 23:17:20 -03:00
Josh Stewart f382c08d60 Remove utils.ino from MISRA scanning 2017-06-29 14:29:43 +10:00
Josh Stewart 6f14959c5c Cleanup output of MISRA script 2017-06-21 15:42:53 +10:00
Josh Stewart 7fb7d83f5f Rename utils folder to avoid conflict with utils.ino 2017-06-16 22:28:42 +10:00