-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use pre-commit hooks for linting (#590)
use pre-commit hooks for linting. Currently this runs codespell for spelling errors, and cargo-fmt and cargo-clippy for coding style.
- Loading branch information
Showing
39 changed files
with
2,869 additions
and
1,410 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 |
---|---|---|
|
@@ -13,8 +13,16 @@ env: | |
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: pre-commit/[email protected] | ||
|
||
build-linux-armv7: | ||
runs-on: [self-hosted, linux, arm] | ||
needs: [lint] | ||
steps: | ||
- name: Setup python | ||
run: | | ||
|
@@ -28,6 +36,7 @@ jobs: | |
|
||
build: | ||
runs-on: ${{ matrix.os }} | ||
needs: [lint] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -82,6 +91,7 @@ jobs: | |
|
||
build-linux-cross: | ||
runs-on: ubuntu-latest | ||
needs: [lint] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -109,6 +119,7 @@ jobs: | |
|
||
build-freebsd: | ||
runs-on: macos-latest | ||
needs: [lint] | ||
timeout-minutes: 30 | ||
strategy: | ||
matrix: | ||
|
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,21 @@ | ||
repos: | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.4 | ||
hooks: | ||
- id: codespell | ||
additional_dependencies: [tomli] | ||
args: ["--toml", "pyproject.toml"] | ||
exclude: (?x)^(ci/testdata.*|images.*)$ | ||
- repo: https://github.com/doublify/pre-commit-rust | ||
rev: v1.0 | ||
hooks: | ||
- id: fmt | ||
- id: cargo-check | ||
- repo: local | ||
hooks: | ||
- id: cargo-clippy | ||
name: cargo clippy | ||
entry: cargo clippy -- -D warnings | ||
language: system | ||
files: \.rs$ | ||
pass_filenames: false |
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
Oops, something went wrong.