I am using git-lint for my Python project.
I have a .gitlint.yaml
file in the root of my git repo, which contains, among other things,
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."
I have even created a ~/.config/pylintrc
file, which contains, among other things,
indent-string=\t
But when i run git lint
, no warnings are disabled, especially not the line 41, col 0: Warning: [mixed-indentation]: Found indentation with tabs instead of spaces
warning.
I have concluded (and verified) that the ~/.config/pylintrc
file isn't being processed at all.
Why is pylint ignoring all configuration options? What troubleshooting steps can I take? My best guess is that pylint, when executed by git lint, is run by some user other than me.
I see in
test/unittest/test_gitlint.py
:So your configuration should be in the right place.
But check if you don't have a cache issue (
/home/user/.git-lint/cache
), as mentioned in issue 34.