How do I ignore files that are not in master branch?

If you want to ignore files in a certain category (duplication, metrics or coverage) or in a specific tool (e.g. rubocop), you can create a file similar to the one below and add it to the root of the project with the files you want to ignore.

The file name must be ".codacy.yaml" or ".codacy.yml"

---
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
exclude_paths:
  - .bundle/
  - spec/**/*
  - benchmarks/**/*
  - '*.min.js'
 

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.