Skip to content

ci: add cognitive_complexity to dart and flutter package - #520

Merged
marcossevilla merged 5 commits into
mainfrom
vgv-ai-bot/issue-519
Oct 15, 2026
Merged

marcossevilla merged 5 commits into
mainfrom
vgv-ai-bot/issue-519

Conversation

@unicoderbot

@unicoderbot unicoderbot Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds optional cognitive_complexity auditing to the dart_package and flutter_package reusable workflows using package:cognitive_complexity via the kevmoo/analytica.dart GitHub Action.

Changes

  • Added run_cognitive_complexity boolean input (default: false) to both workflows to opt-in to the audit step
  • Added supporting inputs: cognitive_complexity_targets, cognitive_complexity_fail_threshold, cognitive_complexity_fail_on_increase, and cognitive_complexity_diff_base
  • Configured fetch-depth to 0 (full history) when cognitive complexity is enabled, and 1 (shallow) otherwise, so diff-based comparisons work correctly
  • Added the 馃 Cognitive Complexity step after Bloc Lint in both workflows
  • Updated documentation for both dart_package.md and flutter_package.md with input descriptions and usage examples, including how to enable PR comment posting via pull-requests: write permission

Closes #519

Closes #519

Co-authored-by: marcossevilla <marcossevilla@users.noreply.github.com>
ryzizub
ryzizub previously approved these changes Oct 1, 2026

@ryzizub ryzizub left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM, quick question: is 15 reasonable threshold, im not sure what number is good so asking if its some standart

@marcossevilla

Copy link
Copy Markdown
Member

LGTM, quick question: is 15 reasonable threshold, im not sure what number is good so asking if its some standart

it's the default for the action, so I think we're good with it as threshold based on the tests I've done

Comment thread .github/workflows/dart_package.yml Outdated
Comment thread .github/workflows/flutter_package.yml Outdated
@marcossevilla

This comment was marked as outdated.

@unicoderbot

This comment was marked as outdated.

@marcossevilla

Copy link
Copy Markdown
Member

@vgvbot /address-review

@unicoderbot

unicoderbot Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

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.

Co-authored-by: marcossevilla <marcossevilla@users.noreply.github.com>
marcossevilla
marcossevilla previously approved these changes Oct 13, 2026
@marcossevilla
marcossevilla merged commit 46ce4b7 into main Oct 15, 2026
17 checks passed
@marcossevilla
marcossevilla deleted the vgv-ai-bot/issue-519 branch October 15, 2026 10:35
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in VGV Open Source 馃 馃馃専 Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

ci: add cognitive_complexity to workflows

2 participants