Created
September 2, 2020 17:49
-
-
Save patrickelectric/123512d85c9ece966f74fc7e4a7f3e44 to your computer and use it in GitHub Desktop.
Find all pylint checks that are failing and print human friendly name for pylintrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
keys=( $(pylint $(git ls-files '*.py') | rg '.*py:\d+:\d+: (.*):.*' -r '$1' | sort | uniq) ) | |
msgs=( $(pylint --list-msgs | rg ":(.*) \(([A-Z]\d+)\).*" -r '$1,$2' | sort) ) | |
for msg in "${msgs[@]}"; do | |
for key in "${keys[@]}"; do | |
if [[ $msg == *"$key" ]]; then | |
echo "${msg::-5}" | |
fi | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment