Repository navigation
Gate cognitive complexity with the macro-aware lint at 9 - #744
Conversation
Opt in to the experimental macro_aware_cognitive_complexity lint at max_complexity = 9, the threshold Clippy's cognitive_complexity held. Drop Clippy's threshold, the workspace deny and the eight now-unfulfilled clippy::cognitive_complexity expectations. Split visible_root_files_merge_body once more, which the lint scored at 10. Document the gate in the developers' guide.
|
@coderabbitai Please review the head commit: the macro-aware cognitive complexity opt-in at 9, removal of the Clippy threshold and deny, eight unfulfilled expects dropped, one extra helper split, and a developers guide section. Any blocking defect? |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer's GuideImplementationRemove obsolete Clippy cognitive-complexity expectations from the login flow and server-launch helpers now that Clippy no longer gates this lint.
ConfigurationReplace Clippy’s cognitive-complexity gate with Whitaker’s experimental macro-aware lint at the same threshold of 9.
DocumentationDocument how the Whitaker gate is enabled, enforced, and refreshed when the installed suite is stale.
TestsRemove obsolete test expectations and extract the grant setup from the visible-root-files scenario to keep it within the new complexity limit.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Replaces Clippy's
WalkthroughThe workspace replaces Clippy’s cognitive-complexity gate with Whitaker’s macro-aware lint, configured at a maximum score of 9. The change also removes existing Clippy expectation attributes and extracts SQLite test grant setup into a helper. ChangesCognitive complexity lint
Possibly related issues
Suggested reviewers: Change: Other Merge Risk:
|
There was a problem hiding this comment.
Gates Passed
6 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Analysis chain
Before merging, verify that the pending CI jobs pass and that Action not completed
|
Replaces Clippy's
cognitive_complexitywith Whitaker's experimentalmacro_aware_cognitive_complexityatmax_complexity = 9, the threshold Clippy held, so macro-generated branching no longer counts. The three scenario test bodies it flagged were split in #743 (merged).dylint.tomlopts in;clippy.tomllosescognitive-complexity-threshold;Cargo.tomllosescognitive_complexity = "deny".#[expect(clippy::cognitive_complexity)](src/login.rs,test-util/src/server/launch.rs,shared_core.rs,sqlite.rs), unfulfilled once the Clippy lint is off.visible_root_files_merge_bodyonce more (grant helper), which the lint scored at 10 once active.Validation:
make fmt,make check-fmt,make lint(sqlite and postgres Whitaker passes) andmake markdownlintgreen; a probe at limit 1 failed as expected.Open PRs touching these files: none of the open PRs touch them.
Summary by Sourcery
Enforce macro-aware cognitive complexity at the existing threshold while removing the obsolete Clippy-based gate.
Enhancements:
Documentation:
Chores: