chore: resolve clippy warnings and add stricter CI check#7367
Merged
Conversation
- Add `cargo clippy -- -D warnings` to CI (without --all-features) - Fix unstable_name_collisions in path.rs using explicit trait syntax - Fix unnecessary_unwrap warnings in tasks/add.rs using if-let - Fix unnecessary_unwrap warning in lockfile.rs using if-let - Remove unused import in cmd.rs test module 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR strengthens the CI linting pipeline by adding a stricter clippy check that runs without feature flags, and fixes all clippy warnings caught by this new check. The changes improve code quality by replacing unsafe unwrap patterns with safer if let syntax and removing unused imports.
Key changes:
- Added stricter clippy CI check to catch warnings in default configuration
- Fixed 6 clippy warnings across the codebase using safer patterns
- Removed unused import in test module
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/test.yml | Added cargo clippy -- -D warnings command to catch warnings in default build configuration |
| src/path.rs | Fixed unstable_name_collisions warning by using explicit PathExt::is_empty(self) syntax |
| src/lockfile.rs | Replaced unsafe unwrap() pattern with if let Some(...) for safer environment variable handling |
| src/cli/tasks/add.rs | Fixed 4 unnecessary_unwrap warnings by replacing is_some() checks with if let Some(...) patterns |
| src/cmd.rs | Removed unused cmd import from test module |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.10 x -- echo |
19.8 ± 0.4 | 19.3 | 23.0 | 1.00 |
mise x -- echo |
19.9 ± 0.3 | 19.2 | 21.4 | 1.00 ± 0.03 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.10 env |
19.6 ± 0.7 | 18.6 | 25.3 | 1.00 |
mise env |
19.8 ± 0.5 | 18.8 | 21.8 | 1.01 ± 0.04 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.10 hook-env |
19.7 ± 0.6 | 18.9 | 26.1 | 1.00 |
mise hook-env |
19.8 ± 0.6 | 18.8 | 22.1 | 1.01 ± 0.04 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.10 ls |
16.9 ± 0.4 | 16.1 | 20.3 | 1.00 |
mise ls |
17.4 ± 0.6 | 16.5 | 23.4 | 1.03 ± 0.04 |
xtasks/test/perf
| Command | mise-2025.12.10 | mise | Variance |
|---|---|---|---|
| install (cached) | 109ms | 110ms | +0% |
| ls (cached) | 66ms | 67ms | -1% |
| bin-paths (cached) | 73ms | 73ms | +0% |
| task-ls (cached) | 283ms | 283ms | +0% |
jdx
pushed a commit
that referenced
this pull request
Dec 18, 2025
### 🚀 Features - **(alias)** rename alias to tool-alias, add shell-alias command by @jdx in [#7357](#7357) - **(upgrade)** display summary of upgraded tools by @jdx in [#7372](#7372) - **(vfox)** embed vfox plugin Lua code in binary by @jdx in [#7369](#7369) ### 🐛 Bug Fixes - **(aqua)** add start_operations for progress reporting by @jdx in [#7354](#7354) - **(github)** improve asset detection for distro-specific and Swift artifacts by @jdx in [#7347](#7347) - **(github)** clean up static_helpers.rs and fix archive bin= option by @jdx in [#7366](#7366) - **(http)** add start_operations for progress reporting by @jdx in [#7355](#7355) - **(lockfile)** place lockfile alongside config file by @jdx in [#7360](#7360) - **(progress)** add start_operations to core plugins by @jdx in [#7351](#7351) - **(ruby-install)** Use ruby_install_bin to update by @calebhearth in [#7350](#7350) - **(rust)** add release_url for rust versions by @jdx in [#7373](#7373) - **(schema)** add `tool_alias`, mark `alias` as deprecated by @SKalt in [#7358](#7358) - **(toolset)** filter tools by OS in list_current_versions by @jdx in [#7356](#7356) - **(ubi)** only show deprecation warning during installation by @jdx in [#7380](#7380) - **(ui)** remove noisy "record size" message during install by @jdx in [#7381](#7381) - update mise-versions URL to use /tools/ prefix by @jdx in [#7378](#7378) ### 🚜 Refactor - **(backend)** unified AssetMatcher with checksum fetching by @jdx in [#7370](#7370) - **(backend)** deprecate ubi backend in favor of github by @jdx in [#7374](#7374) - **(toolset)** decompose mod.rs into smaller modules by @jdx in [#7371](#7371) ### 🧪 Testing - **(e2e)** fix and rename ubi and vfox_embedded_override tests by @jdx in [052ea40](052ea40) ### 📦 Registry - add vfox-gcloud backend for gcloud by @jdx in [#7349](#7349) - convert amplify to use github backend by @jdx in [#7365](#7365) - add github backend for djinni tool by @jdx in [#7363](#7363) - switch glab to native gitlab backend by @jdx in [#7364](#7364) - add s5cmd by @jdx in [#7376](#7376) ### Chore - **(registry)** disable flaky tests for gitu and ktlint by @jdx in [64151cb](64151cb) - resolve clippy warnings and add stricter CI check by @jdx in [#7367](#7367) - suppress dead_code warnings in asset_matcher module by @jdx in [#7377](#7377) ### New Contributors - @calebhearth made their first contribution in [#7350](#7350)
jekis913
added a commit
to jekis913/mise
that referenced
this pull request
Dec 18, 2025
* upstream/main: fix(ui): remove noisy "record size" message during install (jdx#7381) test(e2e): fix and rename ubi and vfox_embedded_override tests fix: update mise-versions URL to use /tools/ prefix (jdx#7378) fix(ubi): only show deprecation warning during installation (jdx#7380) registry: add s5cmd (jdx#7376) chore: suppress dead_code warnings in asset_matcher module (jdx#7377) refactor(backend): deprecate ubi backend in favor of github (jdx#7374) fix(rust): add release_url for rust versions (jdx#7373) feat(vfox): embed vfox plugin Lua code in binary (jdx#7369) refactor(backend): unified AssetMatcher with checksum fetching (jdx#7370) feat(upgrade): display summary of upgraded tools (jdx#7372) fix(github): clean up static_helpers.rs and fix archive bin= option (jdx#7366) refactor(toolset): decompose mod.rs into smaller modules (jdx#7371) chore: resolve clippy warnings and add stricter CI check (jdx#7367) registry: switch glab to native gitlab backend (jdx#7364) fix(ruby-install): Use ruby_install_bin to update (jdx#7350) registry: add github backend for djinni tool (jdx#7363) registry: convert amplify to use github backend (jdx#7365) chore(registry): disable flaky tests for gitu and ktlint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cargo clippy -- -D warningsto CI (runs clippy without--all-features --all-targets)Changes
unstable_name_collisionswarning using explicitPathExt::is_empty(self)syntaxunnecessary_unwrapwarnings usingif let Some(...)patternunnecessary_unwrapwarning usingif let Some(...)patterncmdimport in test moduleTest plan
cargo clippy -- -D warningspassescargo clippy --all-features --all-targets -- -D warningspasses🤖 Generated with Claude Code
Note
Adds a stricter
cargo clippyrun in CI and refactors code to eliminate unwraps/unused imports and minor PathExt usage fix.cargo clippy -- -D warningstounitjob alongside the existing all-features/all-targets run.src/cli/tasks/add.rs: Replaceunwrapchecks withif let Some(...)fordir,description, andshell; clone where needed.src/lockfile.rs: Useif let Some(existing_envs)instead ofis_some/unwrapwhen preserving env-specific entries.src/path.rs: CallPathExt::is_empty(self)inmountto resolve collision warning.src/cmd.rs: Remove unusedcmdimport in test module.Written by Cursor Bugbot for commit bea71d8. This will update automatically on new commits. Configure here.