Codacy Configuration File

Codacy supports configuring certain advanced features through a configuration file.

Currently, you can exclude files using globs and add custom extensions to languages.

You can ignore files globally, for certain categories (duplication, metrics or coverage) or for a specific tool (e.g.: Rubocop).

To add custom extensions to a language you can also add an entry in this file, but keep in mind that some tools might not work out of the box with those extensions and might need changes.

The file name must be ".codacy.yaml" or ".codacy.yml" and should be placed in the root of your project.

---
engines:
 rubocop:
   enabled: true
   exclude_paths:
     - config/engines.yml
 duplication:
   enabled: true
   exclude_paths:
     - config/engines.yml
 metrics:
   enabled: true
   exclude_paths:
     - config/engines.yml
 coverage:
   enabled: true
   exclude_paths:
     - config/engines.yml
languages:
  css:
    extensions:
      - -css.resource
exclude_paths:
  - .bundle/
  - spec/**/*
  - benchmarks/**/*
  - '*.min.js'
 
If you wish to ignore all files with the same extension across all your repository, you should use the following syntax:
 
'**.extension'
 

Please note that if the file exists in the repo and if you have 'exclude paths', the UI ignores, will not apply.

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.