Skip to content

chore: configure centralized clippy lints#43

Merged
bug-ops merged 3 commits intomainfrom
feat/clippy-lints
Dec 26, 2025
Merged

chore: configure centralized clippy lints#43
bug-ops merged 3 commits intomainfrom
feat/clippy-lints

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Dec 26, 2025

Summary

  • Configure centralized clippy lints via [workspace.lints]
  • Enable all major lint groups: clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo
  • Forbid unsafe_code at workspace level
  • Apply clippy --fix for auto-fixable issues
  • Allow noisy lints for incremental improvement

Changes

  • Cargo.toml: Add [workspace.lints.rust] and [workspace.lints.clippy]
  • All crates: Add [lints] workspace = true for inheritance
  • 56 files: Auto-fixed clippy warnings (format args, iter loops, etc.)

Fixed Issues

  1. ref_option in npm parser - changed &Option<T> to Option<&T>
  2. unnecessary_literal_bound in tests - changed &str to &'static str

Test plan

  • cargo clippy --workspace --all-targets --all-features -- -D warnings passes
  • CI passes

@github-actions github-actions bot added rust Rust code changes lsp Language Server Protocol parser Parser changes needs-review Needs review tests Test changes size: XL 500-1000 lines changed labels Dec 26, 2025
- Add [workspace.lints] with clippy::all, pedantic, nursery, cargo
- Forbid unsafe_code at workspace level
- Add [lints] workspace = true to all crates
- Apply clippy --fix for auto-fixable issues
- Allow noisy lints for incremental improvement
- Fix ref_option in npm parser
- Fix unnecessary_literal_bound in tests
@codecov-commenter
Copy link

codecov-commenter commented Dec 26, 2025

Codecov Report

❌ Patch coverage is 71.21212% with 76 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/deps-cargo/src/error.rs 10.52% 17 Missing ⚠️
crates/deps-npm/src/error.rs 11.76% 15 Missing ⚠️
crates/deps-go/src/error.rs 41.17% 10 Missing ⚠️
crates/deps-go/src/registry.rs 53.84% 6 Missing ⚠️
crates/deps-lsp/src/document/state.rs 83.33% 6 Missing ⚠️
crates/deps-lsp/src/server.rs 0.00% 4 Missing ⚠️
crates/deps-go/src/version.rs 50.00% 3 Missing ⚠️
crates/deps-cargo/src/ecosystem.rs 0.00% 2 Missing ⚠️
crates/deps-core/src/cache.rs 66.66% 2 Missing ⚠️
crates/deps-lsp/src/document/lifecycle.rs 60.00% 2 Missing ⚠️
... and 9 more

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
+ Coverage   85.66%   85.73%   +0.07%     
==========================================
  Files          55       55              
  Lines       14664    14642      -22     
==========================================
- Hits        12562    12554       -8     
+ Misses       2102     2088      -14     
Flag Coverage Δ
deps-cargo 79.31% <46.15%> (+0.13%) ⬆️
deps-core 90.99% <62.50%> (+0.05%) ⬆️
deps-go 85.73% <71.21%> (+0.07%) ⬆️
deps-lsp 79.54% <82.79%> (+0.10%) ⬆️
deps-npm 89.55% <37.50%> (+0.12%) ⬆️
deps-pypi 86.69% <93.10%> (-0.02%) ⬇️
overall 85.73% <71.21%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
crates/deps-cargo/src/formatter.rs 100.00% <100.00%> (ø)
crates/deps-cargo/src/lockfile.rs 91.17% <100.00%> (ø)
crates/deps-cargo/src/registry.rs 80.46% <100.00%> (ø)
crates/deps-cargo/src/types.rs 72.82% <ø> (ø)
crates/deps-core/src/completion.rs 95.22% <100.00%> (ø)
crates/deps-go/src/ecosystem.rs 82.96% <100.00%> (ø)
crates/deps-go/src/formatter.rs 100.00% <100.00%> (ø)
crates/deps-go/src/lockfile.rs 97.60% <100.00%> (ø)
crates/deps-go/src/parser.rs 95.51% <100.00%> (+0.02%) ⬆️
crates/deps-go/src/types.rs 82.50% <ø> (ø)
... and 32 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions bot added the ci CI/CD workflows label Dec 26, 2025
@bug-ops bug-ops merged commit 59268ff into main Dec 26, 2025
20 checks passed
@bug-ops bug-ops deleted the feat/clippy-lints branch December 26, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD workflows lsp Language Server Protocol needs-review Needs review parser Parser changes rust Rust code changes size: XL 500-1000 lines changed tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants