Skip to content

ci: enable cognitive complexity for very_good_cli.yaml - #1755

Merged
marcossevilla merged 18 commits into
mainfrom
test/cognitive-complexity
Oct 19, 2026
Merged

marcossevilla merged 18 commits into
mainfrom
test/cognitive-complexity

Conversation

@marcossevilla

@marcossevilla marcossevilla commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Description

Migrates every reusable workflow from very_good_workflows@v1.21.1 to @v2 and enables the cognitive complexity audit added in VeryGoodOpenSource/very_good_workflows#520.

  • All callers (very_good_cli, ci, spdx_license, test_optimizer) now reference @v2.
  • Drops run_bloc_lint: false, which is the default in v2 (the only breaking change). The hook packages built with dart_package.yml no longer run bloc lint, which they never needed.
  • The build job enables run_cognitive_complexity on the ubuntu-latest matrix leg only, so both legs do not race on the sticky PR comment.
  • cognitive_complexity_fail_on_increase is enabled to block regressions relative to the base branch.
  • The build job is granted pull-requests: write so the action can post its sticky comment. On fork PRs the token is read-only and the comment step fails silently without failing the job.
  • The matrix runs with fail-fast: false so a Windows failure does not cancel the Ubuntu run, and vice versa.

cognitive_complexity_diff_base is left empty: on pull requests the action diffs against origin/main, and on pushes to main it scans all of lib. The functions previously over the threshold of 15 were fixed in #1756, #1757, and #1758.

Follow-ups

  • Run package:cognitive_complexity locally beyond the CI defaults (lower threshold, --max-function-lines, bricks/test_optimizer/hooks).
  • Run package:undead to find and clean up dead code.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

📊 Cognitive Complexity Analysis

Tip

Status: Clean - no complexity regressions in the current diff.

Last checked: a820e54 (run).

@marcossevilla
marcossevilla force-pushed the test/cognitive-complexity branch from 4db367e to 6f046a1 Compare October 1, 2026 13:41
@marcossevilla
marcossevilla changed the base branch from main to refactor/cc-mcp-server October 1, 2026 13:41
@marcossevilla
marcossevilla added this pull request to stack #1759 October 1, 2026 13:41
@marcossevilla
marcossevilla force-pushed the test/cognitive-complexity branch 2 times, most recently from 7ef4381 to b1bb803 Compare October 8, 2026 12:50
Base automatically changed from refactor/cc-mcp-server to main October 13, 2026 11:02
@marcossevilla
marcossevilla force-pushed the test/cognitive-complexity branch from b1bb803 to 3286960 Compare October 13, 2026 11:02
@marcossevilla

Copy link
Copy Markdown
Member Author

@vgvbot update this with very_good_workflows@v2

@unicoderbot

unicoderbot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

On it, I'll address the review comments and push the changes.

  • Preparing environment
    • Cloning repository
    • Setting up dev environment
  • Reviewing feedback
  • Working on changes
  • Pushing updates

I've pushed changes to address the feedback.

unicoderbot Bot added a commit that referenced this pull request Oct 16, 2026
Co-authored-by: marcossevilla <marcossevilla@users.noreply.github.com>
@marcossevilla

Copy link
Copy Markdown
Member Author

@vgvbot fix CI failures

@unicoderbot

unicoderbot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

On it, I'll address the review comments and push the changes.

  • Preparing environment
    • Cloning repository
    • Setting up dev environment
  • Reviewing feedback
  • Working on changes
  • Pushing updates

I've pushed changes to address the feedback.

unicoderbot Bot added a commit that referenced this pull request Oct 16, 2026
Co-authored-by: marcossevilla <marcossevilla@users.noreply.github.com>
@marcossevilla

Copy link
Copy Markdown
Member Author

@vgvbot fix CI failures

@unicoderbot

unicoderbot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

On it, I'll address the review comments and push the changes.

  • Preparing environment
    • Cloning repository
    • Setting up dev environment
  • Reviewing feedback
  • Working on changes
  • Pushing updates

I've pushed changes to address the feedback.

unicoderbot Bot added a commit that referenced this pull request Oct 16, 2026
Co-authored-by: marcossevilla <marcossevilla@users.noreply.github.com>
Comment thread .github/workflows/very_good_cli.yaml Outdated
@marcossevilla marcossevilla changed the title ci: run cognitive complexity audit from very_good_workflows#520 ci: bump to very_good_workflows@v2 Oct 16, 2026
marcossevilla and others added 8 commits October 19, 2026 11:40
Co-authored-by: marcossevilla <marcossevilla@users.noreply.github.com>
Co-authored-by: marcossevilla <marcossevilla@users.noreply.github.com>
Co-authored-by: marcossevilla <marcossevilla@users.noreply.github.com>
Pin every reusable workflow to @v2, drop run_bloc_lint (false is the v2 default), and remove the HEAD diff base, which diffed the checkout against itself and made the complexity scan a no-op. The scan now runs only on the ubuntu matrix leg so both jobs do not race on the sticky PR comment.
@unicoderbot

unicoderbot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

On it, I'll address the review comments and push the changes.

  • Preparing environment
    • Cloning repository
    • Setting up dev environment
  • Reviewing feedback
  • Working on changes
  • Pushing updates

I've pushed changes to address the feedback.

unicoderbot Bot and others added 2 commits October 19, 2026 09:45
Co-authored-by: marcossevilla <marcossevilla@users.noreply.github.com>
@unicoderbot

unicoderbot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Heads up — I'm auto-updating this PR by merging the latest main into this branch. No action needed; I'll comment again only if this update hits a conflict or an unexpected error.

unicoderbot Bot and others added 2 commits October 19, 2026 10:45
very_good_workflows v2.0.2 checks out full history when run_cognitive_complexity is enabled (VeryGoodOpenSource/very_good_workflows#532), so the dedicated job with its own fetch-depth: 0 checkout is no longer needed.
@unicoderbot

unicoderbot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Heads up — I'm auto-updating this PR by merging the latest main into this branch. No action needed; I'll comment again only if this update hits a conflict or an unexpected error.

unicoderbot Bot and others added 2 commits October 19, 2026 11:13
Points the build at the PR branch to confirm the fetch-depth fix lets the cognitive complexity step resolve a merge base. Revert to @v2 once the fix is released.
@marcossevilla marcossevilla changed the title ci: bump to very_good_workflows@v2 ci: enable cognitive complexity for flutter_package.yml Oct 19, 2026
@marcossevilla marcossevilla changed the title ci: enable cognitive complexity for flutter_package.yml ci: enable cognitive complexity for very_good_cli.yml Oct 19, 2026
@marcossevilla marcossevilla changed the title ci: enable cognitive complexity for very_good_cli.yml ci: enable cognitive complexity for very_good_cli.yaml Oct 19, 2026
@unicoderbot

unicoderbot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Heads up — I'm auto-updating this PR by merging the latest main into this branch. No action needed; I'll comment again only if this update hits a conflict or an unexpected error.

@unicoderbot

unicoderbot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

I tried to auto-update this PR with main but ran into conflicts. The branch is unchanged — please merge it manually.

@unicoderbot

unicoderbot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Heads up — I'm auto-updating this PR by merging the latest main into this branch. No action needed; I'll comment again only if this update hits a conflict or an unexpected error.

@unicoderbot

unicoderbot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

I tried to auto-update this PR with main but ran into conflicts. The branch is unchanged — please merge it manually.

@unicoderbot

unicoderbot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Heads up — I'm auto-updating this PR by merging the latest main into this branch. No action needed; I'll comment again only if this update hits a conflict or an unexpected error.

@unicoderbot

unicoderbot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

I tried to auto-update this PR with main but ran into conflicts. The branch is unchanged — please merge it manually.

@unicoderbot

unicoderbot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Heads up — I'm auto-updating this PR by merging the latest main into this branch. No action needed; I'll comment again only if this update hits a conflict or an unexpected error.

@unicoderbot

unicoderbot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

I tried to auto-update this PR with main but ran into conflicts. The branch is unchanged — please merge it manually.

@unicoderbot

unicoderbot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Heads up — I'm auto-updating this PR by merging the latest main into this branch. No action needed; I'll comment again only if this update hits a conflict or an unexpected error.

@unicoderbot

unicoderbot Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

I tried to auto-update this PR with main but ran into conflicts. The branch is unchanged — please merge it manually.

…xity

# Conflicts:
#	.github/workflows/very_good_cli.yaml
v2.0.3 includes the fetch-depth fix (VeryGoodOpenSource/very_good_workflows#535), so the temporary pin to the PR branch is no longer needed.
@marcossevilla
marcossevilla merged commit 61db46e into main Oct 19, 2026
8 checks passed
@marcossevilla
marcossevilla deleted the test/cognitive-complexity branch October 19, 2026 14:03
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