Skip to content

refactor: tighten local lint and windows codegen guard#52

Merged
qartik merged 1 commit into
mainfrom
ks-lint-windows-codegen-cleanups
Mar 24, 2026
Merged

refactor: tighten local lint and windows codegen guard#52
qartik merged 1 commit into
mainfrom
ks-lint-windows-codegen-cleanups

Conversation

@qartik
Copy link
Copy Markdown
Member

@qartik qartik commented Mar 24, 2026

Summary

Split out the independent cleanup work from #48.

Included

  • tighten local cargo-clippy pre-commit arguments to use --locked, -D warnings, clippy::pedantic, and clippy::nursery
  • inline the Windows optimized-codegen guard in src/opt.rs instead of keeping a platform-specific stub helper
  • apply the minimal src/lib.rs visibility and test-call cleanups needed for the stricter clippy configuration to pass on top of main

Notes

  • this is intended to keep feat: support dynamic allocation and arrays #48 focused on dynamic allocation and arrays
  • behavior is unchanged aside from the existing Windows optimized-codegen error path still being enforced through the inlined guard

Copilot AI review requested due to automatic review settings March 24, 2026 17:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 clippy pre-commit hook to use --locked and treat warnings as errors (-D warnings) alongside clippy::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.

Comment thread src/lib.rs
Comment thread src/lib.rs
@qartik qartik merged commit 8c14baf into main Mar 24, 2026
13 checks passed
@qartik qartik deleted the ks-lint-windows-codegen-cleanups branch March 24, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants