我为我的Python项目使用git-lint。git-lint pylint没有运行pylintrc文件
我有一个.gitlint.yaml
文件在我的git仓库,其中包含,除其他事项外的根,
pylint:
extensions:
- .py
command: pylint
arguments:
- "--rcfile={DEFAULT_CONFIGS}/.pylintrc" # doesn't seem to work
- "--disable=all" # doesn't work either
- "--output-format=text"
- "--msg-template='{{abspath}}:{{line}}:{{column}}: [{{category}}:{{symbol}}] {{obj}}: {{msg}}'"
- "--reports=n"
filter: "^{filename}:(?P<line>{lines}):((?P<column>\\d+):)? \\[(?P<severity>.+):(?P<message_id>\\S+)\\]\\s+(:)?(?P<message>.+)$"
installation: "Run pip install pylint."
我甚至创造了一个~/.config/pylintrc
文件,其中包含,除其他事项外,
indent-string=\t
但是,当我运行git lint
,没有警告被禁用,尤其是不是警告line 41, col 0: Warning: [mixed-indentation]: Found indentation with tabs instead of spaces
警告。
我已经完成(并验证)~/.config/pylintrc
文件根本没有被处理。
为什么pylint忽略所有配置选项?我可以采取哪些故障排除步骤?我最好的猜测是,当由git lint执行时,pylint由除我以外的某个用户运行。
也许我需要做一些事情来设置DEFAULT_CONFIGS到repo目录? – mareoraft