antiagainst / codeclimate-cppcheck

Code Climate Engine for Cppcheck
MIT License
27 stars 17 forks source link

Max configs is not working #19

Closed OlgaPaw closed 5 years ago

OlgaPaw commented 5 years ago

Hi, Here is my .codeclimate.yml

engines:
  cppcheck:
    enabled: true
    config:
      check: all
      stds:
        - c++11
      max_configs: 42

And output:

== src/main.c (2 issues) ==
0: Too many #ifdef configurations - cppcheck only checks 12 of 290 configurations. Use --force to check all configurations. 
OlgaPaw commented 5 years ago

It is probably a bug in command.py

        if self.config.get('max_self.configs'):
            command.append('--max-self.configs={}'.format(self.config.get('max_self.configs')))

Instead of

        if self.config.get('max_self.configs'):
            command.append('--max_configs={}'.format(self.config.get('max_configs')))
antiagainst commented 5 years ago

Fixed by https://github.com/antiagainst/codeclimate-cppcheck/pull/20.