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

Add remaining pre-commit-hooks #430

Merged
merged 9 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions linters/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,10 @@ lint:
extensions:
- xib

- name: xml
extensions:
- xml

- name: yaml
extensions:
- yaml
Expand Down
145 changes: 145 additions & 0 deletions linters/pre-commit-hooks/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,148 @@ lint:
success_codes: [0, 1]
files:
- ALL
- name: check-added-large-files
enabled: false
output: pass_fail
read_output_from: stdout
run: check-added-large-files ${target}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add python3 to the front of these if appropriate? Shebangs don't work for these executions on Windows.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

False alarm. This was previously WAI, the files are .exe on Windows and inside of Scripts/, so no need for the python3 bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

success_codes: [0, 1]
files:
- ALL
- name: check-ast
enabled: false
output: pass_fail
read_output_from: stdout
run: check-ast ${target}
success_codes: [0, 1]
files:
- python
- name: check-builtin-literals
enabled: false
output: pass_fail
read_output_from: stdout
run: check-builtin-literals ${target}
success_codes: [0, 1]
files:
- python
- name: check-case-conflict
enabled: false
output: pass_fail
read_output_from: stdout
run: check-case-conflict ${target}
success_codes: [0, 1]
files:
- ALL
- name: check-docstring-first
enabled: false
output: pass_fail
read_output_from: stdout
run: check-docstring-first ${target}
success_codes: [0, 1]
files:
- python
- name: check-json
enabled: false
output: pass_fail
read_output_from: stdout
run: check-json ${target}
success_codes: [0, 1]
files:
- json
- name: check-merge-conflict
enabled: false
output: pass_fail
read_output_from: stdout
run: check-merge-conflict ${target}
success_codes: [0, 1]
files:
- ALL
- name: check-shebang-scripts-are-executable
enabled: false
output: pass_fail
read_output_from: stderr
run: check-shebang-scripts-are-executable ${target}
success_codes: [0, 1]
files:
- ALL
- name: check-symlinks
enabled: false
output: pass_fail
read_output_from: stderr
run: check-symlinks ${target}
success_codes: [0, 1]
files:
- ALL
- name: check-toml
enabled: false
output: pass_fail
read_output_from: stderr
run: check-toml ${target}
success_codes: [0, 1]
files:
- toml
- name: check-vcs-permalinks
enabled: false
output: pass_fail
read_output_from: stderr
run: check-vcs-permalinks ${target}
success_codes: [0, 1]
files:
- ALL
- name: check-xml
enabled: false
output: pass_fail
read_output_from: stderr
run: check-xml ${target}
success_codes: [0, 1]
files:
- xml
- name: check-yaml
enabled: false
output: pass_fail
read_output_from: stderr
run: check-yaml ${target}
success_codes: [0, 1]
files:
- yaml
- name: debug-statement-hook
enabled: false
output: pass_fail
read_output_from: stderr
run: debug-statement-hook ${target}
success_codes: [0, 1]
files:
- python
- name: destroyed-symlinks
enabled: false
output: pass_fail
read_output_from: stderr
run: destroyed-symlinks ${target}
success_codes: [0, 1]
files:
- ALL
- name: detect-private-key
enabled: false
output: pass_fail
read_output_from: stderr
run: detect-private-key ${target}
success_codes: [0, 1]
files:
- ALL
- name: mixed-line-ending
enabled: false
output: pass_fail
read_output_from: stdout
run: mixed-line-ending --fix=no ${target}
success_codes: [0, 1]
files:
- ALL
- name: trailing-whitespace
enabled: false
output: rewrite
in_place: true
formatter: true
run: mixed-line-ending --fix=no ${target}
success_codes: [0, 1]
files:
- ALL
Loading