refactor: tighten local lint and windows codegen guard#52
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens local linting enforcement while keeping behavior unchanged, and simplifies Windows-specific codegen guarding by inlining it directly at the call site.
Changes:
- Tighten the
cargo clippypre-commit hook to use--lockedand treat warnings as errors (-D warnings) alongsideclippy::pedantic/clippy::nursery. - Inline the Windows optimized-codegen guard directly in
optimize()and remove the platform-stub helper. - Make small formatting/visibility/test-call adjustments to satisfy stricter lint settings.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/opt.rs |
Removes the platform-stub helper and inlines the Windows guard in optimize(). |
src/lib.rs |
Adjusts visibility of module-flag helpers and cleans up a few format! call sites / test mapping. |
.pre-commit-config.yaml |
Makes clippy stricter by adding --locked and -D warnings to pre-commit args. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Split out the independent cleanup work from #48.
Included
cargo-clippypre-commit arguments to use--locked,-D warnings,clippy::pedantic, andclippy::nurserysrc/opt.rsinstead of keeping a platform-specific stub helpersrc/lib.rsvisibility and test-call cleanups needed for the stricter clippy configuration to pass on top ofmainNotes