Skip to content

chore: Fix clippy warnings#1532

Merged
aeppling merged 1 commit into
rtk-ai:developfrom
KuSh:clippy-fixes
May 4, 2026
Merged

chore: Fix clippy warnings#1532
aeppling merged 1 commit into
rtk-ai:developfrom
KuSh:clippy-fixes

Conversation

@KuSh
Copy link
Copy Markdown
Collaborator

@KuSh KuSh commented Apr 25, 2026

Summary

  • Path Centralization: Hardcoded directory and file paths across all hook logic () are replaced with dedicated, exported constants in . This prevents magic strings and simplifies maintenance when system directories change.
  • Code Cleanup: Move all code only used by tests behind cfg(test) attribute
  • Refactoring: Apply Clippy fixes and address remaining warnings

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • Manual testing: rtk <command> output inspected

@pszymkowiak pszymkowiak added effort-medium 1-2 jours, quelques fichiers enhancement New feature or request labels Apr 25, 2026
@pszymkowiak
Copy link
Copy Markdown
Collaborator

[w] wshm · Automated triage by AI

📊 Automated PR Analysis

♻️ Type refactor
🟡 Risk medium

Summary

This PR centralizes hardcoded directory/file paths into exported constants, moves test-only code behind cfg(test) attributes to eliminate dead_code warnings, and applies various Clippy fixes including collapsing nested if-statements, replacing match-then-map with .map(), and fixing off-by-one boundary checks in buffer capping logic.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Analyzed automatically by wshm · This is an automated analysis, not a human review.

- **Path Centralization:** Hardcoded directory and file paths across all hook logic () are replaced with dedicated, exported constants in . This prevents magic strings and simplifies maintenance when system directories change.
- **Code Cleanup:** Move all code only used by tests behind cfg(test) attribute
- **Refactoring:** Apply Clippy fixes and address remaining warnings

Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
@aeppling aeppling self-assigned this May 4, 2026
Copy link
Copy Markdown
Contributor

@aeppling aeppling left a comment

Choose a reason for hiding this comment

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

Hey @KuSh !

Thanks for the code clean :)

@aeppling aeppling merged commit 7e552ae into rtk-ai:develop May 4, 2026
11 checks passed
@aeppling aeppling mentioned this pull request May 4, 2026
@KuSh KuSh deleted the clippy-fixes branch May 4, 2026 20:41
thehoff pushed a commit to thehoff/contextcrawler that referenced this pull request May 14, 2026
thehoff pushed a commit to thehoff/contextcrawler that referenced this pull request May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort-medium 1-2 jours, quelques fichiers enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants