ci: run cognitive complexity audit from very_good_workflows#520 - #1755
Draft
marcossevilla wants to merge 3 commits into
Draft
marcossevilla wants to merge 3 commits into
marcossevilla wants to merge 3 commits into
Conversation
Contributor
marcossevilla
force-pushed
the
test/cognitive-complexity
branch
from
October 1, 2026 13:41
4db367e to
6f046a1
Compare
marcossevilla
added this pull request to stack #1759
October 1, 2026 13:41
This branch has not been deployed
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.
Status
HOLD
Draft. Do not merge until VeryGoodOpenSource/very_good_workflows#520 is merged and released in a tag.
Description
Tests the cognitive complexity step added in VeryGoodOpenSource/very_good_workflows#520 against the CLI's own code.
buildjob points atflutter_package.yml@vgv-ai-bot/issue-519, enablesrun_cognitive_complexity, and grantspull-requests: writeso the action can post its sticky comment.cognitive_complexity_diff_baseis set to the root commit. On a pull request the action only scans functions the PR changes. Diffing against the root commit makes every file inlibcount as changed, which simulates the full scan a push tomainwould run. Functions over the threshold of 15 get fixed in follow-up commits here, then the override is reverted so the final diff is the config we would ship.Fixes for the full scan
The temporary full scan flagged 11 functions over 15. They are fixed in three PRs against
main:Once all three merge, this branch gets rebased, the full scan should pass, and the temporary override gets reverted.
Next steps
package:cognitive_complexitylocally beyond the CI defaults, such as a lower threshold,--max-function-lines, or scanningbricks/test_optimizer/hooks.package:undeadto find dead code and clean it up here or in a follow-up.cognitive_complexity_fail_on_increase.Type of Change
🤖 Generated with Claude Code