-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRIVERS-2790 Add more linting and integrity checks (#1464)
* Add pre-commit file * Add pre-commit and sphinx build check * undo change
- Loading branch information
Showing
15 changed files
with
144 additions
and
67 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,39 @@ | ||
name: Lint Files | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
|
||
jobs: | ||
# Run "pre-commit run --all-files" | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
|
||
# ref: https://github.com/pre-commit/action | ||
- uses: pre-commit/action@v3.0.0 | ||
- name: Help message if pre-commit fail | ||
if: ${{ failure() }} | ||
run: | | ||
echo "You can install pre-commit hooks to automatically run formatting" | ||
echo "on each commit with:" | ||
echo " pre-commit install" | ||
echo "or you can run by hand on staged files with" | ||
echo " pre-commit run" | ||
echo "or after-the-fact on already committed files with" | ||
echo " pre-commit run --all-files --hook-stage manual" | ||
sphinx-build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
- run: pip install sphinx | ||
- run: cd source && sphinx-build -W -b text . docs_build index.rst |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -9,3 +9,4 @@ logo.png | |
.DS_Store | ||
codereview.rc | ||
.idea/** | ||
docs_build |
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,49 @@ | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-case-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
#- id: end-of-file-fixer | ||
#- id: trailing-whitespace | ||
#- id: check-json | ||
|
||
# We use the Python version instead of the original version which seems to require Docker | ||
# https://github.com/koalaman/shellcheck-precommit | ||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.9.0.6 | ||
hooks: | ||
- id: shellcheck | ||
name: shellcheck | ||
args: ["--severity=error"] | ||
stages: [manual] | ||
|
||
- repo: https://github.com/rstcheck/rstcheck | ||
rev: v6.2.0 | ||
hooks: | ||
- id: rstcheck | ||
additional_dependencies: [sphinx] | ||
args: ["--ignore-languages=c,python,java", "--report-level=error"] | ||
stages: [manual] | ||
|
||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.26.3 | ||
hooks: | ||
- id: check-github-workflows | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: "v1.10.0" | ||
hooks: | ||
# - id: rst-backticks | ||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal | ||
|
||
# - repo: https://github.com/codespell-project/codespell | ||
# rev: "v2.2.6" | ||
# hooks: | ||
# - id: codespell | ||
# exclude_types: [json,yaml] |
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
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
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
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
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
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