mirror of https://github.com/astral-sh/ruff
Check for outdated auto-generated files in CI (#1192)
This commit is contained in:
parent
aa5402fc0e
commit
38141a6f14
|
|
@ -20,6 +20,9 @@ jobs:
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
|
toolchain: nightly-2022-11-01
|
||||||
|
override: true
|
||||||
|
components: rustfmt
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
env:
|
env:
|
||||||
cache-name: cache-cargo
|
cache-name: cache-cargo
|
||||||
|
|
@ -33,6 +36,12 @@ jobs:
|
||||||
${{ runner.os }}-build-
|
${{ runner.os }}-build-
|
||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
- run: cargo build --all --release
|
- run: cargo build --all --release
|
||||||
|
- run: ./target/release/ruff_dev generate-rules-table
|
||||||
|
- run: ./target/release/ruff_dev generate-options
|
||||||
|
- run: git diff --quiet README.md || echo "::error file=README.md::This file is outdated. You may have to rerun 'cargo dev generate-options' and/or 'cargo dev generate-rules-table'."
|
||||||
|
- run: ./target/release/ruff_dev generate-check-code-prefix && cargo fmt -- src/checks_gen.rs
|
||||||
|
- run: git diff --quiet src/checks_gen.rs || echo "::error file=src/checks_gen.rs::This file is outdated. You may have to rerun 'cargo dev generate-check-code-prefix'."
|
||||||
|
- run: git diff --exit-code -- README.md src/checks_gen.rs
|
||||||
|
|
||||||
cargo_fmt:
|
cargo_fmt:
|
||||||
name: "cargo fmt"
|
name: "cargo fmt"
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ pub struct Options {
|
||||||
`RUF002`, and `RUF003`.
|
`RUF002`, and `RUF003`.
|
||||||
"#,
|
"#,
|
||||||
default = r#"[]"#,
|
default = r#"[]"#,
|
||||||
value_type = "Vec<char>",
|
value_type = "Vec<a test>",
|
||||||
example = r#"
|
example = r#"
|
||||||
# Allow minus-sign (U+2212), greek-small-letter-rho (U+03C1), and the asterisk-operator (U+2217),
|
# Allow minus-sign (U+2212), greek-small-letter-rho (U+03C1), and the asterisk-operator (U+2217),
|
||||||
# which could be confused for "-", "p", and "*", respectively.
|
# which could be confused for "-", "p", and "*", respectively.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue