Codacy - Is it possible to turn off rule for specified paths using codacy.yaml file?

249 Views Asked by At

I couldn't find the information in Codacy documentation or github repositories, but has anyone ever tried turning off rules for specific paths? This is a complete guess what it could look like:

---
engines:
  detekt:
    exclude_rules:
      TooManyFunctions:
        exclude_paths:
          - '**/tests/**'
exclude_paths:
  - "**.sh"
  - "**.md"
  - "frontend/example/**"
1

There are 1 best solutions below

0
Bruno_Ferreira On

You can achieve that by using the config file for detekt instead: https://detekt.dev/docs/introduction/configurations/#path-filters--excludes--includes

Codacy will use the native configuration file from the tool and you can specify the ignores by rule there.