Default Analysis Configuration

The following is the standard configuration for analysis after adding a repository to Code Climate.

Maintainability Checks

By default, Maintainability checks are turned on for your repository with standard thresholds:

Default thresholds

  • Argument count
  • Threshold: 4
  • Complex logic
  • Threshold: 4
  • File lines
  • Threshold: 250
  • Method complexity
  • Threshold: 5
  • Method count
  • Threshold: 20
  • Method length
  • Threshold: 25
  • Nested control flow
  • Threshold: 4
  • Return statements
  • Threshold: 4
  • Similar blocks of code
  • Threshold: language-specific defaults
  • Identical blocks of code
  • Threshold: language-specific defaults

Per-Language Mass Threshold Defaults

Our identical-code and similar-code checks use language-specific mass thresholds. For additional info, refer to our doc on Duplication.

LanguageDefault Mass Threshold
Ruby

Python

JavaScript

PHP

TypeScript

Go

Java

Swift

Kotlin

Scala

C#
18

32

45

28

45

100

40

40

60

60

60

Excluded Folders

We exclude the following folders from our analysis by default:

config/
db/
dist/
features/
**/node_modules/
script/
**/spec/
**/test/
**/tests/
Tests/
**/vendor/
**/*_test.go
**/*.d.ts

Plugins

Plugins are not enabled by default.

📘

Customizing your configuration

As described in Configuring Your Code Climate Analysis, Quality's analysis checks can be configured within your repository's Settings page.

We also offer Advanced Configuration.

Related Issues

🚧

UTF-8

Quality analysis currently only supports UTF-8 encoding. Files not encoded in UTF-8 may be skipped during the parsing process if a non-UTF-8 character is encountered.

🚧

Max File Size

Files larger than 500Kb will not be analyzed, due to engine memory constraints.

Sample .codeclimate.yml

As an alternative to the configurations available in your repository's Settings page, you can choose to commit a .codeclimate.yml or .codeclimate.json configuration file.

More details on advanced configurations here, but you can use this .codeclimate.yml as a start:

version: "2"         # required to adjust maintainability checks

checks:
  argument-count:
    enabled: true
    config:
      threshold: 4
  complex-logic:
    enabled: true
    config:
      threshold: 4
  file-lines:
    enabled: true
    config:
      threshold: 250
  method-complexity:
    enabled: true
    config:
      threshold: 5
  method-count:
    enabled: true
    config:
      threshold: 20
  method-lines:
    enabled: true
    config:
      threshold: 25
  nested-control-flow:
    enabled: true
    config:
      threshold: 4
  return-statements:
    enabled: true
    config:
      threshold: 4
  similar-code:
    enabled: true
    config:
      threshold: #language-specific defaults. overrides affect all languages.
  identical-code:
    enabled: true
    config:
      threshold: #language-specific defaults. overrides affect all languages.

# plugins:
#   eslint:
#     enabled: true
#     channel: "eslint-6"
#   rubocop:
#     enabled: true
#     channel: "rubocop-0-79"

exclude_patterns:
- "config/"
- "db/"
- "dist/"
- "features/"
- "**/node_modules/"
- "script/"
- "**/spec/"
- "**/test/"
- "**/tests/"
- "Tests/"
- "**/vendor/"
- "**/*_test.go"
- "**/*.d.ts"