diff --git a/tools/defines/readme.md b/tools/defines/readme.md index 7865bb57681c..ed9d372c0919 100644 --- a/tools/defines/readme.md +++ b/tools/defines/readme.md @@ -17,4 +17,6 @@ Outputs the defines provided by `limits.h`/`climits`. - `stdint.c` Outputs the defines provided by `stdint.h`/`cstdint`. - `create_platform_cfg.sh` -Generates a platform file from the given compiler which can be given to Cppcheck via `--platform`. \ No newline at end of file +Generates a platform file from the given compiler which can be given to Cppcheck via `--platform`. +- `run_cppcheck.sh` +Generates the compiler-specific configurations for the given compiler and runs Cppcheck with them. \ No newline at end of file diff --git a/tools/defines/run_cppcheck.sh b/tools/defines/run_cppcheck.sh new file mode 100644 index 000000000000..af0567c58320 --- /dev/null +++ b/tools/defines/run_cppcheck.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# TODO: use temporary filename +./create_platform_cfg.sh > platform.cfg + +# TODO: add option to pass define to cppcheck +./defines.sh > defines.txt + +./cppcheck --platform=platform.cfg "$@" \ No newline at end of file