Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cppcheck --inline-suppr flag not present #1066

Open
jeffstjean opened this issue Oct 6, 2022 · 1 comment
Open

Cppcheck --inline-suppr flag not present #1066

jeffstjean opened this issue Oct 6, 2022 · 1 comment

Comments

@jeffstjean
Copy link

I cannot determine if this is an issue with how codeclimate generates the config.json or an issue with codeclimate-cppcheck so it may be related to this. It looks like the --inline-suppr flag is not being passed properly to cppcheck. Here is the command output. You can see the config getting printed with "inline-suppr"=>true but the actual command is missing the flag: 'cppcheck', '--enable=all', '--language=c', '--std=c11', '--xml', '--xml-version=2', '--file-list=/tmp/tmp5p_qmdbd'

$ CODECLIMATE_DEBUG=1 codeclimate analyze
Starting analysis
I, [2022-10-06T01:54:34.137381 #1]  INFO -- : starting engine structure
D, [2022-10-06T01:54:34.199127 #1] DEBUG -- : /config.json content: {"enabled"=>true, "channel"=>"stable", "include_paths"=>[{ removed }], "debug"=>"1"}
D, [2022-10-06T01:54:34.202392 #1] DEBUG -- : docker run: ["docker", "run", "--name", "cc-engines-structure-stable-35358a3e-337f-49af-97d0-8f8b99275604", "--cap-drop", "all", "--label", "com.codeclimate.label=39b59b49-5cd4-40c2-9b16-146469120686", "--log-driver", "none", "--memory-swap", "-1", "--net", "none", "--rm", "--volume", "{ removed }", "--volume", "/tmp/cc/7dc1e425-113e-460f-b4d0-0d4e76cc3a26:/config.json:ro", "--user", "9000:9000", "--memory", "1024000000", "codeclimate/codeclimate-structure"]
D, [2022-10-06T01:54:34.408643 #1] DEBUG -- : engine stderr: 12
D, [2022-10-06T01:54:34.408782 #1] DEBUG -- : engine stderr: Parser process id: 12
D, [2022-10-06T01:54:34.408817 #1] DEBUG -- : engine stderr: codeclimate-parser socket not present
D, [2022-10-06T01:54:34.408829 #1] DEBUG -- : engine stderr: waiting 1s...
I, [2022-10-06T01:54:35.731679 #1]  INFO -- : finished engine structure
I, [2022-10-06T01:54:35.731802 #1]  INFO -- : starting engine duplication
D, [2022-10-06T01:54:35.731891 #1] DEBUG -- : /config.json content: {"enabled"=>true, "channel"=>"stable", "include_paths"=>[{ removed }], "debug"=>"1"}
D, [2022-10-06T01:54:35.732108 #1] DEBUG -- : docker run: ["docker", "run", "--name", "cc-engines-duplication-stable-a2b36140-7c35-4be3-aa12-5836e4818945", "--cap-drop", "all", "--label", "com.codeclimate.label=d1002583-07ee-4c5c-924b-5cfd1ca327fc", "--log-driver", "none", "--memory-swap", "-1", "--net", "none", "--rm", "--volume", "{ removed }", "--volume", "/tmp/cc/b22a4ae9-5b13-45b2-93cc-c1b98a78a34d:/config.json:ro", "--user", "9000:9000", "--memory", "1024000000", "codeclimate/codeclimate-duplication"]
D, [2022-10-06T01:54:35.972969 #1] DEBUG -- : engine stderr: 11
D, [2022-10-06T01:54:35.973059 #1] DEBUG -- : engine stderr: Parser process id: 11
D, [2022-10-06T01:54:35.973076 #1] DEBUG -- : engine stderr: codeclimate-parser socket not present
D, [2022-10-06T01:54:35.973088 #1] DEBUG -- : engine stderr: waiting 1s...
D, [2022-10-06T01:54:37.281357 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.280922 #1] DEBUG -- : Processing 0 csharp files concurrency=2
D, [2022-10-06T01:54:37.281565 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.281287 #1] DEBUG -- : Processed 0 csharp files
D, [2022-10-06T01:54:37.281596 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.281382 #1] DEBUG -- : Reported 0 violations...
D, [2022-10-06T01:54:37.281666 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.281516 #1] DEBUG -- : Processing 0 go files concurrency=2
D, [2022-10-06T01:54:37.281993 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.281751 #1] DEBUG -- : Processed 0 go files
D, [2022-10-06T01:54:37.282043 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.281842 #1] DEBUG -- : Reported 0 violations...
D, [2022-10-06T01:54:37.282056 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.281984 #1] DEBUG -- : Processing 0 java files concurrency=2
D, [2022-10-06T01:54:37.282251 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.282123 #1] DEBUG -- : Processed 0 java files
D, [2022-10-06T01:54:37.282287 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.282180 #1] DEBUG -- : Reported 0 violations...
D, [2022-10-06T01:54:37.282415 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.282357 #1] DEBUG -- : Processing 0 javascript files concurrency=2
D, [2022-10-06T01:54:37.282581 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.282530 #1] DEBUG -- : Processed 0 javascript files
D, [2022-10-06T01:54:37.282684 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.282639 #1] DEBUG -- : Reported 0 violations...
D, [2022-10-06T01:54:37.282804 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.282742 #1] DEBUG -- : Processing 0 kotlin files concurrency=2
D, [2022-10-06T01:54:37.282936 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.282876 #1] DEBUG -- : Processed 0 kotlin files
D, [2022-10-06T01:54:37.283013 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.282952 #1] DEBUG -- : Reported 0 violations...
D, [2022-10-06T01:54:37.283131 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.283081 #1] DEBUG -- : Processing 0 php files concurrency=2
D, [2022-10-06T01:54:37.283251 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.283204 #1] DEBUG -- : Processed 0 php files
D, [2022-10-06T01:54:37.283280 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.283250 #1] DEBUG -- : Reported 0 violations...
D, [2022-10-06T01:54:37.283396 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.283351 #1] DEBUG -- : Processing 0 python files concurrency=2
D, [2022-10-06T01:54:37.283551 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.283498 #1] DEBUG -- : Processed 0 python files
D, [2022-10-06T01:54:37.283576 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.283525 #1] DEBUG -- : Reported 0 violations...
D, [2022-10-06T01:54:37.283683 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.283635 #1] DEBUG -- : Processing 0 ruby files concurrency=2
D, [2022-10-06T01:54:37.283808 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.283770 #1] DEBUG -- : Processed 0 ruby files
D, [2022-10-06T01:54:37.283855 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.283794 #1] DEBUG -- : Reported 0 violations...
D, [2022-10-06T01:54:37.284006 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.283963 #1] DEBUG -- : Processing 0 typescript files concurrency=2
D, [2022-10-06T01:54:37.284159 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.284118 #1] DEBUG -- : Processed 0 typescript files
D, [2022-10-06T01:54:37.284239 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.284201 #1] DEBUG -- : Reported 0 violations...
D, [2022-10-06T01:54:37.284446 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.284395 #1] DEBUG -- : Processing 0 scala files concurrency=2
D, [2022-10-06T01:54:37.284635 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.284575 #1] DEBUG -- : Processed 0 scala files
D, [2022-10-06T01:54:37.284664 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.284614 #1] DEBUG -- : Reported 0 violations...
D, [2022-10-06T01:54:37.284776 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.284728 #1] DEBUG -- : Processing 0 swift files concurrency=2
D, [2022-10-06T01:54:37.284918 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.284883 #1] DEBUG -- : Processed 0 swift files
D, [2022-10-06T01:54:37.284969 #1] DEBUG -- : engine stderr: D, [2022-10-06T01:54:37.284921 #1] DEBUG -- : Reported 0 violations...
I, [2022-10-06T01:54:37.365385 #1]  INFO -- : finished engine duplication
I, [2022-10-06T01:54:37.365496 #1]  INFO -- : starting engine cppcheck
D, [2022-10-06T01:54:37.365594 #1] DEBUG -- : /config.json content: {"enabled"=>true, "config"=>{"check"=>"all", "language"=>"c", "stds"=>["c11"], "inline-suppr"=>true, "inconclusive"=>false}, "channel"=>"stable", "include_paths"=>[{ removed }], "debug"=>"1"}
D, [2022-10-06T01:54:37.366045 #1] DEBUG -- : docker run: ["docker", "run", "--name", "cc-engines-cppcheck-stable-46767c4d-73c9-492a-8028-64bce81e6465", "--cap-drop", "all", "--label", "com.codeclimate.label=ffdbfc0b-ea8a-4b11-9c48-77e9a10e4ee6", "--log-driver", "none", "--memory-swap", "-1", "--net", "none", "--rm", "--volume", "{ removed }", "--volume", "/tmp/cc/0dbc186c-ef49-40f3-8551-e27cf5ea639a:/config.json:ro", "--user", "9000:9000", "--memory", "1024000000", "codeclimate/codeclimate-cppcheck"]
{ removed }
D, [2022-10-06T01:54:38.204301 #1] DEBUG -- : engine stderr: [cppcheck] config: {'enabled': True, 'config': {'check': 'all', 'language': 'c', 'stds': ['c11'], 'inline-suppr': True, 'inconclusive': False}, 'channel': 'stable', 'include_paths': ['{ removed }'], 'debug': '1'}
D, [2022-10-06T01:54:38.204755 #1] DEBUG -- : engine stderr: [cppcheck] analyzing 8 files
D, [2022-10-06T01:54:38.204776 #1] DEBUG -- : engine stderr: [cppcheck] command: ['cppcheck', '--enable=all', '--language=c', '--std=c11', '--xml', '--xml-version=2', '--file-list=/tmp/tmp5p_qmdbd']
{ removed }
D, [2022-10-06T01:54:38.272561 #1] DEBUG -- : engine stdout: 

I, [2022-10-06T01:54:38.272757 #1]  INFO -- : finished engine cppcheck

Version Info:

Linux { removed } #54~20.04.1-Ubuntu SMP Thu Sep 1 16:17:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linu
Client: Docker Engine - Community
 Version:           20.10.17
 API version:       1.41
 Go version:        go1.17.11
 Git commit:        100c701
 Built:             Mon Jun  6 23:02:57 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.17
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.11
  Git commit:       a89b842
  Built:            Mon Jun  6 23:01:03 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.6
  GitCommit:        10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
 runc:
  Version:          1.1.2
  GitCommit:        v1.1.2-0-ga916309
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
@nmasseyKM
Copy link

nmasseyKM commented Oct 25, 2022

It looks like the default image codeclimate/codeclimate-cppcheck:latest is built from 128c31c68fabe1df20691a65d3abfa6161252e1b, which is prior to the suppression support

Edited to add: already mentioned in #989

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants