Add pep8-naming and more pre-commit hooks#64
Conversation
|
pre-commit fails to run cause git is not installed in the container. May need to rethink this... |
84e39d9 to
900dd5f
Compare
a0386a1 to
ee9090f
Compare
|
Build failing because pre-commit cannot find shellcheck
|
|
Now I don't know why it fails. Maybe cause it's an older version (0.5.0). Shellcheck 0.7.1 doesn't complain locally. |
7329d4a to
f10bf29
Compare
|
Okay, I give up on ShellCheck. I can't install from the tarball cause the container doesn't have |
f10bf29 to
9a493dc
Compare
|
@Xithrius Are you planning on finishing this? If I remember correctly, @SebastiaanZ was since he did #79 but I think he's been too busy. If you are, then the CI stuff here still needs to be migrated to GH Actions. Otherwise, I should find time to finish this myself since it is my PR after all. By the way, why are you putting "rebase" in your commit summaries when they look like they are merge commits, not rebases? If you were to actually rebase master, that would have required a force push. |
I don't know how to properly test this PR, so it would probably be best for you to finish this up.
I've accidentally used the wrong terminology, thank you for pointing that out. |
c5e99a7 to
ae8a5f0
Compare
It is a flake8 plugin which enforces PEP 8 naming conventions. Resolves #63
Hooks added: * check-merge-conflict - checks for files with merge conflict strings * check-toml - attempts to load all toml files to verify syntax * check-yaml - attempts to load all yaml files to verify syntax * end-of-file-fixer - ensures files end in a newline and only a newline * mixed-line-ending - replaces mixed line endings with LF * trailing-whitespace - trims trailing whitespace * python-check-blanket-noqa - enforces that noqa annotations always occur with specific codes See: python-discord/organisation#138
Pre-commit requires git.
cd5ec15 to
720a32f
Compare
jb3
left a comment
There was a problem hiding this comment.
This all looks good. Everything works perfect locally.
Relevant Issues
Resolves #63
python-discord/organisation#138
Description
New hooks were added for pre-commit and they will run in CI too. The
pipenv run lintscript will now run all the new hooks, including flake8.Hooks added
A couple of these hooks automatically apply fixes. However, they still report failure and leave any changes they make uncommitted. Therefore, the user has to commit the automatic fixes.
check-merge-conflict- Check for files that contain merge conflict strings.check-toml- Attempts to load all toml files to verify syntax.check-yaml- Attempts to load all yaml files to verify syntax.end-of-file-fixer- Makes sure files end in a newline and only a newline.mixed-line-ending- Replaces mixed line endings with LF.trailing-whitespace- Trims trailing whitespace.python-check-blanket-noqa- Enforce thatnoqaannotations always occur with specific codesReasoning