Skip to content

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

Open
unicoderbot[bot] wants to merge 1 commit into
mainfrom
vgv-ai-bot/issue-519
Open

unicoderbot[bot] wants to merge 1 commit 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 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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

ci: add cognitive_complexity to workflows

1 participant