【问题标题】:How to configure Codacy Python linters?如何配置 Codacy Python 短绒?
【发布时间】:2020-12-07 17:27:16
【问题描述】:

我最近在我的存储库中启用了 GitHub Codacy 扫描。 Pylint* 和 Prospector 模块(如果这是正确的术语)报告了很多警告:

我必须相信有一种方法可以配置他们标记的内容,可能是通过rc 文件或放置在某处.yml,但我还没有弄清楚配置文件应该是什么被命名,它们应该放在哪里,以及允许的语法是什么。如果我能弄清楚 R 的 FM,我会很高兴 RTFM。

如何在 GitHub 上配置 Codacy 代码扫描器调用的 linter?

【问题讨论】:

标签: python github github-actions codacy


【解决方案1】:

Codacy 将为每个 linter 选择默认配置文件。

勘探者 (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

皮林特 (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

您可以在此处查看 Codacy 的文档以了解更多工具的详细信息: https://docs.codacy.com/repositories-configure/code-patterns/#i-have-my-own-tool-configuration-file

另外,如果您在 Codacy 的 APP 中设置项目,您也可以在设置中配置这些模式,而不是使用配置文件。

【讨论】:

    猜你喜欢
    • 2023-03-25
    • 2016-05-31
    • 2018-01-22
    • 2019-04-14
    • 1970-01-01
    • 1970-01-01
    • 2019-11-16
    • 1970-01-01
    • 2020-01-22
    相关资源
    最近更新 更多