Skip to content

Commit d5a6688

Browse files
authored
Use a lintcheck specific Clippy configuration file in the CI (#14233)
By default, lintcheck will use the `clippy.toml` file found at the toplevel of the repository (`CARGO_MANIFEST_DIR`). This file is meant for configuration of Clippy applied to Clippy sources. This creates a new `lintcheck/ci-config/clippy.toml` file which is used by the CI when running lintcheck. By default this uses the default Clippy configuration. changelog: none
2 parents 0a141ab + e1d6f1f commit d5a6688

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/lintcheck.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666

6767
- name: Run lintcheck
6868
if: steps.cache-json.outputs.cache-hit != 'true'
69-
run: ./target/debug/lintcheck --format json --all-lints --crates-toml ./lintcheck/ci_crates.toml
69+
run: env CLIPPY_CONF_DIR="$PWD/lintcheck/ci-config" ./target/debug/lintcheck --format json --all-lints --crates-toml ./lintcheck/ci_crates.toml
7070

7171
- name: Upload base JSON
7272
uses: actions/upload-artifact@v4
@@ -97,7 +97,7 @@ jobs:
9797
run: cargo build --manifest-path=lintcheck/Cargo.toml
9898

9999
- name: Run lintcheck
100-
run: ./target/debug/lintcheck --format json --all-lints --crates-toml ./lintcheck/ci_crates.toml
100+
run: env CLIPPY_CONF_DIR="$PWD/lintcheck/ci-config" ./target/debug/lintcheck --format json --all-lints --crates-toml ./lintcheck/ci_crates.toml
101101

102102
- name: Upload head JSON
103103
uses: actions/upload-artifact@v4

lintcheck/ci-config/clippy.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Configuration applied when running lintcheck from the CI
2+
#
3+
# The CI will set the `CLIPPY_CONF_DIR` environment variable
4+
# to `$PWD/lintcheck/ci-config`.
5+
6+
avoid-breaking-exported-api = false

0 commit comments

Comments
 (0)