From 216fb72ce5c02ef05fcfe4d5106d7306f0d5f76c Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Wed, 6 Apr 2022 13:46:18 -0500 Subject: [PATCH] Use config files for cpplint options Rather than specifying all the filters on the command-line in the makefile, we use two different cpplint config files (.cpplint for normal operation, and .cpplint-noisy for more verbose analysis). Signed-off-by: Michael Richters --- .cpplint | 9 +++++++++ .cpplint-noisy | 9 +++++++++ Makefile | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 .cpplint create mode 100644 .cpplint-noisy diff --git a/.cpplint b/.cpplint new file mode 100644 index 00000000..7f3bd52d --- /dev/null +++ b/.cpplint @@ -0,0 +1,9 @@ +set noparent + +extensions=cpp,h,ino + +filter=-build/include +filter=-legal/copyright +filter=-readability/namespace +filter=-runtime/references +filter=-whitespace diff --git a/.cpplint-noisy b/.cpplint-noisy new file mode 100644 index 00000000..361ae92b --- /dev/null +++ b/.cpplint-noisy @@ -0,0 +1,9 @@ +set noparent + +extensions=cpp,h,ino + +filter=-build/include +filter=-legal/copyright +filter=-readability/namespace +filter=-runtime/references +filter=-whitespace/line_length diff --git a/Makefile b/Makefile index 29a3464f..4e0086dc 100644 --- a/Makefile +++ b/Makefile @@ -112,11 +112,11 @@ check-formatting: bin/format-code.sh --check cpplint-noisy: - -bin/cpplint.py --filter=-legal/copyright,-build/include,-readability/namespace,-whitespace/line_length,-runtime/references --recursive --extensions=cpp,h,ino src examples + -bin/cpplint.py --config=.cpplint-noisy --recursive src plugins examples cpplint: - bin/cpplint.py --quiet --filter=-whitespace,-legal/copyright,-build/include,-readability/namespace,-runtime/references --recursive --extensions=cpp,h,ino src examples + bin/cpplint.py --config=.cpplint --quiet --recursive src plugins examples SHELL_FILES := $(shell if [ -d bin ]; then egrep -n -r -l "(env (ba)?sh)|(/bin/(ba)?sh)" bin; fi)