mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Adds check-coding-style target to our Makefiles
This commit is contained in:
parent
f26824bcf4
commit
3615c84ee5
13
Makefile.am
13
Makefile.am
@ -25,10 +25,12 @@ MAINTAINERCLEANFILES = \
|
||||
build/ltoptions.m4 \
|
||||
build/ltsugar.m4 \
|
||||
build/ltversion.m4 \
|
||||
coding-style.txt \
|
||||
compile \
|
||||
config.guess \
|
||||
config.sub \
|
||||
configure \
|
||||
cppcheck.txt \
|
||||
depcomp \
|
||||
install-sh \
|
||||
ltmain.sh \
|
||||
@ -52,6 +54,17 @@ cppcheck:
|
||||
--std=posix . 2> cppcheck.txt
|
||||
cat cppcheck.txt
|
||||
|
||||
check-style: check-coding-style
|
||||
|
||||
check-coding-style:
|
||||
-cpplint.py \
|
||||
$$(find . -name "*.h" -o -name "*.cc" | xargs) 2>&1 \
|
||||
| egrep -v $$(echo -n "catchall" ; \
|
||||
for i in $$(cat test/coding_style_suppressions.txt); do echo -n "|"$$i; done) \
|
||||
| sed 's/^\./warning: ./g' > coding-style.txt
|
||||
-cat coding-style.txt
|
||||
|
||||
|
||||
@VALGRIND_CHECK_RULES@
|
||||
VALGRIND_SUPPRESSIONS_FILES = valgrind_suppressions.txt
|
||||
|
||||
|
21
test/coding_style_suppressions.txt
Normal file
21
test/coding_style_suppressions.txt
Normal file
@ -0,0 +1,21 @@
|
||||
./headers/modsecurity/rule.h:59
|
||||
./others/
|
||||
./src/audit_log/writer/https.cc:26
|
||||
./src/audit_log/writer/parallel.cc:26
|
||||
./src/collection/backend/in_memory-per_process.h:61
|
||||
./src/config.h:0
|
||||
./src/parser/driver.h:39
|
||||
./src/parser/seclang-parser.cc
|
||||
./src/parser/seclang-scanner.cc
|
||||
./src/request_body_processor/multipart.h:36
|
||||
./src/utils/acmp.cc
|
||||
./src/utils/acmp.h
|
||||
./src/utils/mbedtls/
|
||||
./src/utils/md5.cc
|
||||
./src/utils/md5.h
|
||||
./src/utils/msc_tree.cc
|
||||
./src/utils/msc_tree.h
|
||||
./test/benchmark/owasp-modsecurity-crs/
|
||||
./test/fuzzer
|
||||
./test/libfuzzer
|
||||
Total errors found
|
Loading…
x
Reference in New Issue
Block a user