Closed alundilong closed 1 year ago
+1 to this as it's making this plugin unusable for our use case.
My config looks like this:
version: "2"
plugins:
cppcheck:
enabled: true
config:
check: all
debug: true
language: c
stds:
- c11
inline-suppr: true
And it's clear the option isn't enabled in the command:
D, [2022-10-06T01:35:53.083608 #1] DEBUG -- : /config.json content: {"enabled"=>true, "config"=>{"check"=>"all", "debug"=>true, "language"=>"c", "stds"=>["c11"], "inline-suppr"=>true}, "channel"=>"stable", "include_paths"=>[{ removed }], "debug"=>"1"}
D, [2022-10-06T01:35:53.084039 #1] DEBUG -- : docker run: ["docker", "run", "--name", "cc-engines-cppcheck-stable-e133a445-f5eb-4ee6-be31-5fea2e6693a1", "--cap-drop", "all", "--label", "com.codeclimate.label=a3a03c8c-e355-42a1-bd69-9883b9732b4e", "--log-driver", "none", "--memory-swap", "-1", "--net", "none", "--rm", "--volume", "{ removed }", "--volume", "/tmp/cc/33611a0e-0df5-4e2c-9763-7e42c8a029d8:/config.json:ro", "--user", "9000:9000", "--memory", "1024000000", "codeclimate/codeclimate-cppcheck"]
D, [2022-10-06T01:35:53.923484 #1] DEBUG -- : engine stderr: [cppcheck] config: {'enabled': True, 'config': {'check': 'all', 'debug': True, 'language': 'c', 'stds': ['c11'], 'inline-suppr': True}, 'channel': 'stable', 'include_paths': [{ removed }], 'debug': '1'}
I'm seeing the same behavior as above. Additionally, modifying the config to look like
plugins:
cppcheck:
enabled: true
config:
inline-suppr: 'true'
does cause the value to be passed as a string, but it still does not propagate to the command line
Is this repo still supported? I'm using this for Gitlab's static analysis on MRs and I don't have the ability to change where Gitlab pulls the image from
Hey thanks for the report! Unfortunately I don't have time to maintain it right now; if anybody is willing to manage it, I'd happy to facilitate!
This should be fixed now, can you try by running the following?
git clone https://github.com/antiagainst/codeclimate-cppcheck
cd codeclimate-cppcheck
docker build . -t codeclimate/codeclimate-cppcheck:latest
Then use codeclimate like usual
Fixed in master, please reopen if you still experience this bug.
We're trying to get the dockerhub image updated. In the mean time, you'll have to build the image yourself to get the fix.
if statement in command.py should be like,
https://github.com/antiagainst/codeclimate-cppcheck/blob/1c1977e1716519c2d998399b0dfb980726dea122/lib/command.py#L49