Skip to content

chore(lint): deny as casts via clippy#134

Merged
sachiniyer merged 4 commits intomainfrom
lint/deny-as-conversions
Mar 6, 2026
Merged

chore(lint): deny as casts via clippy#134
sachiniyer merged 4 commits intomainfrom
lint/deny-as-conversions

Conversation

@sachiniyer
Copy link
Copy Markdown
Contributor

@sachiniyer sachiniyer commented Mar 6, 2026

Summary

  • Adds as_conversions = "deny" to [lints.clippy] in Cargo.toml
  • Prevents silent truncation and lossy conversions from as casts
  • Enforces use of try_into/into/From for type conversions

Test plan

  • cargo clippy passes with zero violations (no existing as casts)
  • CI passes

🤖 Generated with Claude Code


Open with Devin

sachiniyer and others added 3 commits March 6, 2026 03:30
…sk sampling

The +0.5 offset in mask_region_at was intended for continuous pixel-center
sampling but is incorrect for discrete pixel-to-pixel coordinate mapping.
It caused the viewport corner (0,0) to map to logo pixel (2,5) instead of
(0,0), shifting/cropping the logo and misclassifying 7-12% of pixels.

Fixes #125
Detail bug: bug_8f5a6e86-4467-41d4-af7c-0c168357e204

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…sampling

Map [0, viewport-1] to [0, logo-1] so both corners of the logo are
correctly represented. The previous fix removed the +0.5 offset but
still used a ratio-of-sizes mapping that couldn't reach the last logo
pixel, breaking the square symmetry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prefer `try_into`/`into`/`From` over `as` casts to prevent silent
truncation and lossy conversions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sachiniyer sachiniyer merged commit b21c40e into main Mar 6, 2026
11 checks passed
@sachiniyer sachiniyer deleted the lint/deny-as-conversions branch March 6, 2026 23:36
sachiniyer added a commit that referenced this pull request Mar 12, 2026
## Summary
- Bumps version from 0.1.10 to 0.1.11
- The release workflow will auto-tag and build artifacts when merged to
main

### Changes since v0.1.10

**Features:**
- Add shell tab completion via clap_complete (#182)
- Add --scan-id flag to bugs list command (#184)
- Add scans list command (#163)
- Add scans to the skill.md for the detail CLI (#185)
- Auto-detect repository in detail-bugs skill (#160)

**Fixes:**
- Show user-friendly error messages instead of debug output (#129)
- Continue list numbering across pages instead of resetting (#130)
- Add file locking to prevent concurrent config overwrites (#131)

**Chores & Refactoring:**
- Replace Makefile with cargo xtask (#159)
- Upgrade all dependencies to latest versions (#158)
- Enable comprehensive clippy lints (pedantic, nursery, restriction)
(#134, #135, #144, #152, #153, #154, #155)
- Add GitHub Pages workflow for API docs (#178)
- Add Scalar API reference page (#177)
- Add integration tests against live API (#181)
- Remove alpha warning from README (#156)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant