Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pre-commit library to run linters #7365

Open
noloerino opened this issue Aug 8, 2024 · 0 comments
Open

Use pre-commit library to run linters #7365

noloerino opened this issue Aug 8, 2024 · 0 comments
Assignees
Labels
Code Quality 💯 Improvements or issues to improve quality of codebase

Comments

@noloerino
Copy link
Collaborator

We currently run pre-commit via a shell script that needs to manually be linked to .git/hooks/pre-commit, but in my experience I've found this to be somewhat unreliable.

I'm not sure if this is due to some versioning or configuration differences, but running black + flake8 + isort on all files in current main leads to hundreds of warnings in my local dev environment, so I edited my own copy of the pre-commit hook to only change files in git diff --name-only. Moreover, it seems like the exit code of a failed black --check does not properly pre-empt a commit on a failed lint, so I frequently have to go back and amend a commit on a failed lint.

We should add pre-commit as a dev dependency to automatically handle lints for us so we don't have to worry about fixing the script.

@noloerino noloerino added the Code Quality 💯 Improvements or issues to improve quality of codebase label Aug 8, 2024
@noloerino noloerino self-assigned this Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Quality 💯 Improvements or issues to improve quality of codebase
Projects
None yet
Development

No branches or pull requests

1 participant