Now that all remaining in-tree cases where we define or undef a CONFIG
symbol have been migrated to Kconfig or renamed to CFG we can make the
CI check more robust. We will exclude the doc, tools and arch/arm/dts
directories from this check as they are special cases. Further, we can
exclude the scripts/kconfig/lkc.h and include/linux/kconfig.h files as
the CONFIG values they define are special tooling cases and not real
symbols.
In the case of docs, the only places that currently fail this test are
old documentation that should be rewritten so that we can remove this
special case.
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
# If grep succeeds and finds a match the test fails as we should
# have no matches.
- script: git grep -E '^#[[:blank:]]*(define|undef)[[:blank:]]*CONFIG_'
- include/configs `find arch -name config.h` && exit 1 || exit 0
+ :^doc/ :^arch/arm/dts/ :^scripts/kconfig/lkc.h
+ :^include/linux/kconfig.h :^tools/ && exit 1 || exit 0
- job: cppcheck
displayName: 'Static code analysis with cppcheck'
# If grep succeeds and finds a match the test fails as we should
# have no matches.
- git grep -E '^#[[:blank:]]*(define|undef)[[:blank:]]*CONFIG_'
- include/configs `find arch -name config.h` && exit 1 || exit 0
+ :^doc/ :^arch/arm/dts/ :^scripts/kconfig/lkc.h
+ :^include/linux/kconfig.h :^tools/ && exit 1 || exit 0
# QA jobs for code analytics
# static code analysis with cppcheck (we can add --enable=all later)