Rust: `cargo --config <file> clippy` is not clippy, `-Dclippy::pedantic` misses the regex, RUSTFLAGS -Dwarnings is warnings-as-errors (check SKIPs for Rust), RUSTDOCFLAGS credited, unsafe_code warn ≠ forbid, rust-toolchain.toml pins the version, release profile inheritance
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 28/100
Piste de recherche
The bugs sit in the Rust validator: the command match in ecosystems/rust/tools.py (around line 273), the regex patterns in ecosystems/rust/practices.py (lines 20-25), the unsafe_code logic in tools.py (lines 153-159), and cargo_build_types in ecosystems/rust/init.py. Start by reproducing one case, such as cargo --config x clippy or -Dclippy::pedantic, as a unit test. Done means each quoted repro gives the expected status and the existing Rust tests still pass. Several items are design questions, so confirm the approach with maintainers before changing behaviour.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
nushell: every lint job runs cargo --config lints.toml clippy … → "clippy does not run" (tools.py:273 starts_with(argv, ("cargo","clippy"))); serde: -Dclippy::pedantic is missed by \bclippy::pedantic\b → "missing clippy::pedantic"; tokio and serde set RUSTFLAGS: -Dwarnings on every job while warnings-as-errors is "not applicable to Rust" (and ripgrep's FAIL hint says "run shellcheck"); ripgrep is credited -D warnings from RUSTDOCFLAGS only; ruff PASSes security-scanning "unsafe_code forbidden" while the workspace sets unsafe_code = "warn" and 13 files contain unsafe { (bat denys, which #[allow] overrides); nushell's rust-toolchain.toml pins 1.97.1 but every job is "Rust default"; ripgrep's release workflow builds a profile that inherits release ("missing Release").
Evidence from the corpus audit
nushell/nushell / static-analysis, compiler-warnings
- kind: FALSE_NEGATIVE
- actual: FAIL:
Rust: clippy is configured (Cargo.toml, clippy.toml) but does not run; FAIL:Rust: missing Rust lint settings: cargo clippy, clippy::pedantic - expected: PASS: every lint job (Linux/MacOS/Windows
lint, and the fuzz jobs) runs clippy - evidence:
.github/workflows/ci.yml:178-187:- &step_clippy/name: Clippy/env: CARGO_BUILD_WARNINGS: deny/run: >-/
rustup component add clippy/cargo --config "${{ github.workspace }}/.cargo/ci.toml"/clippy ${{ env.cargo-options }}/--profile ${{ env.profile }}
(folded scalar: one commandcargo --config <file> clippy --all-targets --profile dev);
validatorecosystems/rust/tools.py:273:return analysed() if starts_with(argv, ("cargo", "clippy"), ("cargo-clippy",)) else None;
ecosystems/rust/practices.py:20:r"\bcargo\s+(?:\+\S+\s+)?clippy\b"— both requireclippyright aftercargo(toolchain aside); verifiedre.searchon the command →False - repro: step
run: cargo --config .cargo/ci.toml clippy --all-targets -- -D warnings→ static-analysis "does not run" - confidence: high
serde-rs/serde / compiler-warnings
- kind: FALSE_NEGATIVE
- actual: WARN:
missing Rust lint settings: clippy::pedantic/found cargo clippy -D warnings - expected: PASS: every clippy invocation denies
clippy::pedantic - evidence:
.github/workflows/ci.yml:148:- run: cd serde && cargo clippy --features rc,unstable -- -Dclippy::all -Dclippy::pedantic(same on lines 149-153);
validatorecosystems/rust/practices.py:25:_setting("clippy::pedantic", r"\bclippy::pedantic\b|^\s*pedantic\s*=")—\bdoes not match betweenDandcin-Dclippy::pedantic
(checked: regex matches-D clippy::pedantic, not-Dclippy::pedantic) - repro: step
run: cargo clippy -- -Dclippy::pedantic→ pedantic reported missing - confidence: high
astral-sh/ruff / security-scanning (and sharkdp/bat wording)
- kind: FALSE_POSITIVE
- actual: ruff: PASS:
Rust: CI scans the code for security problems with unsafe_code forbidden(unit.); bat: PASS... with unsafe_code forbidden - expected: ruff: WARN: the workspace sets
unsafe_code = "warn", 13 files containunsafe {, and only one of ~55 crates forbids it;
bat: right status, but the cratesdeny(overridable by#[allow]), they do notforbid - evidence:
astral-sh__ruff/Cargo.toml:270-271:[workspace.lints.rust]/unsafe_code = "warn";
grep -rl "forbid(unsafe_code)" crates --include=lib.rs --include=main.rs→ onlycrates/ruff_text_size/src/lib.rs:19:#![forbid(unsafe_code)];
grep -rl "unsafe {" crates --include=*.rs | wc -l→ 13;
sharkdp__bat/src/lib.rs:22:#![deny(unsafe_code)],src/bin/bat/main.rs:1:#![deny(unsafe_code)];
validatorecosystems/rust/tools.py:153:_FORBIDS_UNSAFE = re.compile(r"#!\[\s*(?:forbid|deny)\s*\([^)]*\bunsafe_code\b"),:159:_FORBIDDEN = frozenset({"forbid", "deny"});
docs/ecosystems/rust.md:unsafe_code forbidden crate-wide ... where cargo builds— one member crate's attribute is credited to the whole workspace build - repro: workspace
Cargo.tomlwith[workspace.lints.rust] unsafe_code = "warn", cratesa(usesunsafe {}) andb(#![forbid(unsafe_code)]), CIcargo build --workspace→ PASS - confidence: high
tokio-rs/tokio, serde-rs/serde, BurntSushi/ripgrep, clap-rs/clap / warnings-as-errors
- kind: FALSE_NEGATIVE (design gap) + MESSAGE
- actual: tokio, serde:
[SKIP] warnings-as-errors: not applicable to Rust; ripgrep:[FAIL] warnings-as-errors: warnings are not treated as errors in CI configuration/run shellcheck in CI: it fails on any finding; clap: FAIL for PowerShell/Shell only - expected: PASS for tokio and serde (
RUSTFLAGS: -Dwarningson every job), and for a Rust project the hint should not be "run shellcheck"; Rust is the one ecosystem where "warnings as errors" has a canonical spelling - evidence:
tokio-rs__tokio/.github/workflows/ci.yml:14:RUSTFLAGS: -Dwarnings(alsoloom.yml:15,stress-test.yml:13);
serde-rs__serde/.github/workflows/ci.yml:13:RUSTFLAGS: -Dwarnings;
validatorchecks/warnings_as_errors.py:languages=handled(PracticeName.WARNINGS_AS_ERRORS);ecosystems/rust/practices.pydefines only
PracticeName.WARNINGS,HARDENING,SANITIZERS—-D warningsis folded into compiler-warnings, so Rust is never "handled" here - repro:
Cargo.toml+ workflow withenv: RUSTFLAGS: -Dwarningsandrun: cargo build→ SKIP - confidence: medium (by design per docs, but the SKIP/FAIL wording is wrong for the ecosystem)
BurntSushi/ripgrep / compiler-warnings
- kind: FALSE_POSITIVE (one component) / MESSAGE
- actual: FAIL:
Rust: missing Rust lint settings: cargo clippy, clippy::pedantic/Rust: found -D warnings - expected:
-D warningsshould not be credited: the only occurrence isRUSTDOCFLAGS(rustdoc lints), nothing passes it to rustc or clippy - evidence:
grep -rn "D warnings|deny(warnings)|Dwarnings"over*.rs,*.toml,*.yml,*.sh→ only.github/workflows/ci.yml, where:251-253:
env:/RUSTDOCFLAGS: -D warnings/run: cargo doc --no-deps --document-private-items --workspace;
validatorecosystems/rust/practices.py:22-23:-D warningspattern is matched in any CI text - repro: step with
env: RUSTDOCFLAGS: -D warnings+run: cargo doc→ "found -D warnings" - confidence: medium
BurntSushi/ripgrep / ci-build-types
- kind: FALSE_NEGATIVE
- actual: FAIL:
linux / nightly: missing Debug + sanitizers, Release, Release + sanitizers(all 6 combos "missing Release"); map: every release.ymlbuild-releasejob hasconfigurations: [] - expected: the release workflow builds a profile that inherits
release; it should count as Release (even if only on tags) - evidence:
.github/workflows/release.yml:187:${{ env.CARGO }} build --verbose --profile release-lto --features pcre2 ${{ env.TARGET_FLAGS }};
Cargo.toml:[profile.release-lto]/inherits = "release"; validatorecosystems/rust/__init__.py:33-41(cargo_build_types):return frozenset() if profiles else frozenset({"debug"})— a custom profile yields no build type - repro:
Cargo.tomlwith[profile.fast] inherits = "release"+ stepcargo build --profile fast→ no configuration - confidence: low (tag-only workflow; custom profiles need Cargo.toml lookup)
nushell/nushell / platform-matrix (rust-toolchain.toml)
- kind: UNSUPPORTED
- actual: every nushell job: toolchains
Rust default([FAIL] platform-matrix ... Rust: ... (default, beta)style); ruff gets1.99.0only because a job setsRUSTUP_TOOLCHAIN - expected:
rust-toolchain.tomlpins the toolchain every plaincargoinvocation uses; the matrix should read1.97.1for nushell (and1.99.0for ruff from the file, not the env) - evidence:
nushell__nushell/rust-toolchain.toml:17:channel = "1.97.1";astral-sh__ruff/rust-toolchain.toml:2:channel = "1.99.0";astral-sh__ruff/.github/workflows/ci.yaml:401:RUSTUP_TOOLCHAIN: "1.99.0";
validator:grep -rln rust-toolchain project_validator→ only therust-toolchain@action pattern inecosystems/rust/__init__.py - repro:
rust-toolchain.toml(channel = "1.80") + workflowrun: cargo test→ toolchain "default" - confidence: medium
Found by the regression-corpus audit (235 real repositories, one or more per ecosystem profile; corpus and expected results in corpus/). Evidence is quoted from the audited checkouts at the commits pinned in corpus/projects.toml; <checkouts>/<owner>__<repo> is such a checkout.
🤖 Generated with Claude Code
- Langage dominant
- Python
- Étoiles
- 4
- Forks
- 1
- Merge moyen
- 10 h 41 min
- PR mergées (30 j)
- 79
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de cpp-best-practices/project_validator
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
cpp-best-practices/project_validator#267 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
cpp-best-practices/project_validator#263 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
cpp-best-practices/project_validator#260 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
cpp-best-practices/project_validator#259 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
cpp-best-practices/project_validator#255 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de cpp-best-practices/project_validator
Issues similaires
-
add entry to blockOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"Peut-être pris @0z5a l’a pris aujourd’hui. Ouverteneeds-triage
Difficulté 2/5 Une demi-journée Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 2 jours
-
plot_graph crashes when a mesh node has no m2m edgePeut-être pris @tygvi l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
mllam/neural-lam#883 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
future-agi/future-agi#4092 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
transcript analytics: a text whose only protected spans the prose pass redacts is withheld wholeOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
WingedGuardian/GENesis-AGI#4641 ·
Les mainteneurs répondent en général sous 1 jour