max_configs and suppressions-list invalid
My codeclimate version is 0.85.18.
When I used the cppcheck plugin in codeclimate, I detected the following errors, but they weren't errors in the code, so I wanted to suppress them.
== src/modem_api.c (1 issue) ==
1300: The function get_api_entity is never used.
== src/quectel-CM/MPQMUX.c (1 issue) ==
272: The function qmi_name_get is never used.
== src/quectel-CM/main.c (1 issue) ==
0: Too many #ifdef configurations - cppcheck only checks 12 of 14 configurations. Use --force to check all configurations.
my .codeclimate.yml as following: version: "2" plugins: cppcheck: enabled: true config: language: c max_configs: 20 inconclusive: false suppressions-list: .cppcheck-suppressions inline-suppr: true stds: - c11 undefines: - CONFIG_PID_FILE_FORMAT
.cppcheck-suppressions as following toomanyconfigs :src/quectel-CM/ *:src/modem_api.c
According to your Readme, the above configuration should suppress errors, but it doesn't. Am I missing something?
Hello, Ive got the same problem. I experimented a little, and it seems like all other command options exept the 2 mentioned gets parsed and appended correctly
The config options are still fine in the JSON that gets parsed, but didnt get appended to the cppcheck command
D, [2021-10-31T12:30:30.608292 #1] DEBUG -- : engine stderr: [cppcheck] command: ['cppcheck', '--enable=warning', '--xml', '--xml-version=2', '--file-list=/tmp/tmpq2jbf1oi'] Command that gets executed
[2021-10-31T12:30:30.607986 #1] DEBUG -- : engine stderr: [cppcheck] config: {'enabled': True, 'config': {'check': 'warning', 'max_configs': 42, 'inconclusive': False}, 'channel': 'stable', 'include_paths': [...], 'debug': '1'}
Debug output regarding config
Hi, it seems to work when I run it in the latest docker container,
Try building with:
git clone https://github.com/antiagainst/codeclimate-cppcheck
cd codeclimate-cppcheck
docker build . -t codeclimate/codeclimate-cppcheck:latest
Then go back to your cpp project and try running codeclimate analyze .
This will replace the image from dockerhub with the built one locally.
definitely fixed on my side, please re-open if the issue persists with the latest image. thanks!