Configuring Your Code Climate Analysis

Our engines-based analysis lets you configure your analysis via a .codeclimate.yml file in the root of your repository. As shown in the sample file below, the 3 major nodes include:

  • engines:
  • ratings:
  • exclude_paths:

Issues in files not listed in either the ratings OR exclude_paths nodes will be reported, but will not count toward your repo's overall GPA.

In addition, Code Climate also honors the configuration files of the underlying native static analysis tools, such as .rubocop.yml, and .eslintrc.*.

If you haven't committed a .codeclimate.yml (or other tool-specific config files needed for analysis), you can find the inferred settings by heading to your repo's individual page, and append analysis_config to the URL. Example: https://codeclimate.com/repos/592dd25fc6ce3f0266000383/analysis_config

For configuration of specific engines, please see the support doc for that engine.
For information on configuring specific aspects of your analysis, please see the following docs:

Engines-based Analysis Sample File

engines:
  rubocop:
    enabled: true
    #checks:
    #  Rubocop/Metrics/ClassLength:
    #    enabled: false
  brakeman:
    enabled: true
  eslint:
    enabled: true
  csslint:
    enabled: true
  duplication:
    enabled: true
    config:
      languages:
      - ruby:
      - javascript:
ratings:
  paths:
  - app/**
  - lib/**
  - "**.rb"
  - "**.go"
exclude_paths:
- spec/**/*
- "**/vendor/**/*"

Classic Analysis Only

If your repository is still being analyzed by our Classic analysis, rather than specifying engines you'd like enabled, you can specify the programming languages that Code Climate should consider during our analysis. Note that our Classic analysis only supports Ruby, JavaScript, PHP and Python.

Please see the example .codeclimate.yml below, that is configured for our Classic analysis.

JavaScript: true
Ruby: true
Python: false
PHP: false

exclude_paths:
- test/**/*
- vendor/**/*

For more information on how our engines-based analysis compares to our Classic analysis, please see our doc!

Related Issues

Configuring Your Code Climate Analysis