How to configure Codacy Python linters?

517 views Asked by At

I recently enabled GitHub Codacy scans on my repo. The Pylint* and Prospector modules (if that is the right terminology) report a lot of warnings:
enter image description here

I have to believe there's a way to configure what they flag, perhaps via an rc file or a .yml placed somewhere, but I haven't figured out what the config files should be named, where they should be placed, and what the allowable syntax(es) are. I'd be happy to RTFM if I could figure out the FM to R.

How do I configure the linters invoked by Codacy code scanners on GitHub?

1

There are 1 answers

0
paulopontesm On

Codacy will pick up the default config files for each linter.

Prospector (http://prospector.landscape.io/en/master/profiles.html#profiles-configuration)

.landscape.yml, .landscape.yaml, landscape.yml, landscape.yaml,
.prospector.yml, .prospector.yaml, prospector.yml, prospector.yaml

Pylint (http://pylint.pycqa.org/en/latest/faq.html#how-do-i-find-the-option-name-for-pylintrc-corresponding-to-a-specific-command-line-option)

pylintrc, .pylintrc

You can check Codacy's docs here for the details of more tools: https://docs.codacy.com/repositories-configure/code-patterns/#i-have-my-own-tool-configuration-file

Also, if you set up your project in Codacy's APP, you can also configure those patterns in the settings instead of using a config files.