mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
Run rustfmt in CI (#15217)
I considered running clippy as well but ort takes too long to build
This commit is contained in:
parent
b10aaf4e9c
commit
e754edaecf
2 changed files with 21 additions and 0 deletions
5
.github/workflows/lint.yml
vendored
5
.github/workflows/lint.yml
vendored
|
|
@ -40,6 +40,11 @@ jobs:
|
|||
with:
|
||||
# Version range or exact version of Python to use, using SemVer's version range syntax. Reads from .python-version if unset.
|
||||
python-version: "3.10"
|
||||
- name: Setup Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -r requirements-dev.txt
|
||||
|
|
|
|||
|
|
@ -152,3 +152,19 @@ init_command = [
|
|||
'--dry-run={{DRYRUN}}',
|
||||
'pylint==2.15.5',
|
||||
]
|
||||
|
||||
[[linter]]
|
||||
code = 'RUSTFMT'
|
||||
include_patterns = ['**/*.rs']
|
||||
command = [
|
||||
'python',
|
||||
'-m',
|
||||
'lintrunner_adapters',
|
||||
'run',
|
||||
'rustfmt_linter',
|
||||
'--binary=rustfmt',
|
||||
'--config-path=rust/rustfmt.toml',
|
||||
'--',
|
||||
'@{{PATHSFILE}}'
|
||||
]
|
||||
is_formatter = true
|
||||
|
|
|
|||
Loading…
Reference in a new issue