-
Notifications
You must be signed in to change notification settings - Fork 438
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
Add pre-commit configuration #756
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
exclude: "node_modules|.venv|isso/tests" | ||
|
||
repos: | ||
- repo: meta | ||
hooks: | ||
- id: check-hooks-apply | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: check-added-large-files | ||
args: ['--maxkb=500'] | ||
- id: check-executables-have-shebangs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't have any bash scripts afaik |
||
- id: check-case-conflict | ||
- id: check-yaml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have YAML files apart from the ansible example? |
||
args: [--unsafe] | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: fix-encoding-pragma | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
language: python | ||
files: ^isso/.*\.py$ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this catch |
||
types: [python] | ||
args: ["--config=setup.cfg", "--select=E9,F63,F7,F82"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isn't this severely limiting what errors we'll get? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not to be too frustrating at the time of the commit or a PR. |
||
|
||
# Specific part for https://pre-commit.ci | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Am I understanding this correctly that there'll be a little bot auto-committing to this repo? I'd rather avoid this. Proposing changes is fine, but commit rights seem a bit overkill. |
||
ci: | ||
autofix_prs: true | ||
autoupdate_schedule: quarterly | ||
skip: [ | ||
"check-hooks-apply" | ||
] | ||
submodules: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't we want tests formatted correctly as well?