Codacy Configuration File

Codacy supports configuring certain advanced features through a configuration file.

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). The category metrics refers to the information you find under File details such as Size, Structure and Complexity. 

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.

If you want to disable an engine that needs to be done directly in the Code Patterns page.

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

exclude_paths: - config/engines.yml duplication:
exclude_paths: - config/engines.yml metric:
exclude_paths: - config/engines.yml coverage:
exclude_paths: - config/engines.yml languages: css: extensions: - '-css.resource' exclude_paths: - '.bundle/**' - 'spec/**/*' - 'benchmarks/**/*' - '**.min.js'
- '**/tests/**'
If you wish to, you should use the following syntax:
'**.extension' ignores all files with the same extension across all your repository
'test/*' ignores all files in the root of test
'test/**' ignores everything inside test
'test/**/*' ignores all files inside sub-folder of test
'**/*.resource' Ignores all .resource in all folders and sub-folders
To configure your 'exclude_paths', you can read more about the Java glob syntax.

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

Validating your configuration file

You can use the codacy-analysis-cli to validate the contents of your configuration file. Run the following command in the folder where the configuration file is located:

codacy-analysis-cli validate-configuration --directory `pwd`


If you have questions about Codacy configuration file, please, contact us at 



Have more questions? Submit a request


  • 0
    Derek Suzuki

     What is the best way to verify whether the excluded files configuration from .codacy.yaml is actually taking effect?  I've added some patterns, but I see that issues relating to some of the excluded files are still visible.  Can I execute a full re-analysis of the repo to get those out?

  • 0
    Codacy Team

    Hey, to reanalyse your project you just need to enter the latest commit and click to reanalyse. You can see an example on how to do that in our FAQ. Cheers

  • 0
    Derek Suzuki

    Our .codacy.yaml file is currently (at the HEAD of the master branch) as follows:


      - libs/*/test

      - libs/*/tests

      - **/external/**

      - **/vendor/**


    We have analyzed some commits (including a manual reanalysis of the latest commit) since then. The following files currently appear in the files tab and have issues associated with them.



    The first one would seem to match the pattern **/vendor/**, so I would expect it and its issues to be removed from the Codacy project. I guess that to filter the second file I should change “libs/*/tests” to “libs/*/tests/**”.  Am I misunderstanding this?

  • 0

    Is there not a way to export a configuration (say from the global account patterns screen) and apply it to a previously existing project (which has it's own patterns config)? It seems like the global setting only works for new projects?

  • 0
    Codacy Team

    Hi Ksclarke, 

    There is no way to export a configuration file, however, if you want to apply new account pattern rules to old projects, that can be done. Just go to your Project -> Code patterns -> select the language and then Reset the patterns. 

    If you have any more questions, please contact us directly on

  • 0
    Felipe Figueroa

    How should I specify the disabled and enabled engines? They appear in TitleCase in my panel, but the example codacy.yml shows them in lowercase.

    What about, for example "Node Security", "PHP Code Sniffer", "PHP Mess Detector". Should they appear in snake_case?

    The example file doesn't show the specific rules for each engine. Say I want to disable `Avoid static access` for PHP Mess Detector. How or where should that go?

    Why do duplication and metrics appear as engines, if they should be a cross engine setting?

    How do I specify that ESLint should use my .eslint file to enforce rules?

    I'm very confused, but I'd like to have a codacy.yml in the root of the project. It would spread codacy usage among everyone that's currently using my open source project.

Article is closed for comments.