Skip to content

Commit 1c57778

Browse files
committed
Enable cppcheck
cppcheck crashes on many Arduino platforms, incl. ESP8266. The workaround is included here: `check_skip_packages = yes` Also add temp analysis files to .gitignore
1 parent 6f1b748 commit 1c57778

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ buildcache/
55
arduino.json
66
c_cpp_properties.json
77

8+
cppcheck-addon-ctu-file-list
9+
*.ctu-info
10+
*.dump
11+
812
/.vscode/
13+
/.vs
914
/release
1015
/platformio_override.ini
1116
/.pio/

platformio.ini

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ default_envs = fastled_webserver__d1_mini, fib512__d1_mini, fib256__d1_mini, fib
3939

4040
src_dir = ./esp8266-fastled-webserver/
4141
data_dir = ./esp8266-fastled-webserver/data
42-
build_cache_dir = ~/.buildcache
42+
; build_cache_dir = ~/.buildcache
4343

4444
[common]
4545
ldscript_1m128k = eagle.flash.1m128.ld
@@ -91,6 +91,13 @@ extra_scripts =
9191
post:pio-scripts/strip-floats.py
9292

9393
[env]
94+
check_skip_packages = yes # required for cppcheck to not crash as of 2021-12-14
95+
check_tool = cppcheck
96+
# check_tool = cppcheck, clangtidy # eventually want to also run clangtidy (which crashes with error 0xC0000005 (STATUS_ACCESS_VIOLATION))
97+
check_flags =
98+
cppcheck: --enable=all --std=c++11 --inconclusive --addon=cert.py
99+
clangtidy: --checks=*
100+
94101
framework = arduino
95102
board_build.flash_mode = dout
96103
board_build.filesystem = littlefs

0 commit comments

Comments
 (0)