Gitlab code climate configuration

how do you overwrite code climate default configurations? For example I want disable warnings like “code climate found function with 5 parameters, recommended max is 4 parameters”

ping @jheimbuck_gl

@bardia - I’ve added additional plugins by adding a codeclimate.yml file to the repo and believe that file also allows rule customizations but the GitLab and CodeClimate docs will be your best guide as you get into more advanced use of this feature.

Hope this helps.

1 Like

@jheimbuck_gl your response is a bit cryptic for me (I’m evaluating this feature on a trial now). I have the same issue after bringing in an existing repository, and I appreciate that your response suggests it’s possible to configure CodeClimate engines, but a bit more explanation or pointing to an actual example somewhere would be really helpful. I’ve had to turn the feature off and I need a bit of assistance to disable some of the warnings. Thanks in advance for any help.

Hi @valearn - I have a small sample project in which I added a codeclimate.yml file to add the sonar-java plugin to the default engine ran by the Code Quality template.

To extend this to change default values for the maintainability checks I would follow the directions from the code climate documentation to enable, disable or modify specific checks. For instance I could change the argument count check (which this example triggers) so that my project allows methods with up to 12 arguments by adding this line to the codeclimate.yml file:

    enabled: true
      threshold: 12

I hope that helps clarify and that the links to the documentation allows you to setup further what you are attempting.

Perfect. I now get it – the codeclimate.yml is read by the included template. I was missing that. Much appreciated.