This repository has been archived by the owner on May 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: Add pre-commit to buildservice repo
Changes to bash scripts are the result of making the changes required to get the linters to pass. Shebangs have been changed to the portable #!/usr/bin/env style. Bash 'strict mode' has been standardized across scripts. Bug: T325183
- Loading branch information
1 parent
9089ddb
commit 9c9c207
Showing
4 changed files
with
67 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
statistics = True | ||
import-order-style = edited | ||
# allow long test names and long strings | ||
extend-ignore = | ||
# line breaks before binary operators | ||
W503 | ||
# whitespace before : | ||
E203 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
default_language_version: | ||
python: python3 | ||
|
||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 22.12.0 | ||
hooks: | ||
- id: black | ||
args: ["--diff"] | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.11.4 | ||
hooks: | ||
- id: isort | ||
args: ["--diff"] | ||
additional_dependencies: [toml] | ||
files: \.py$ | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
args: [--allow-multiple-documents] | ||
# - id: check-shebang-scripts-are-executable | ||
- id: check-executables-have-shebangs | ||
- id: check-merge-conflict | ||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.9.0.2 | ||
hooks: | ||
- id: shellcheck |
This file contains 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
This file contains 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