From b58b33710eeee8b673fddf7d85e2963403b9ee72 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sun, 30 Aug 2026 20:10:18 +0000 Subject: [PATCH] chore: add dependency lower-bound and cognitive complexity CI workflows --- .github/workflows/complexity.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/lower_bound.yml | 25 +++++++++++++++++++++++++ analysis_options.yaml | 2 -- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/complexity.yml create mode 100644 .github/workflows/lower_bound.yml diff --git a/.github/workflows/complexity.yml b/.github/workflows/complexity.yml new file mode 100644 index 00000000..51e66b87 --- /dev/null +++ b/.github/workflows/complexity.yml @@ -0,0 +1,28 @@ +name: Cognitive Complexity Audit + +on: + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + audit: + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: read + steps: + - name: Checkout Codebase + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Dart SDK + uses: dart-lang/setup-dart@v1 + + - name: Run Complexity Scanner + uses: kevmoo/analytica.dart/packages/cognitive_complexity@main + with: + diff-base: origin/${{ github.base_ref }} + fail-threshold: 15 + fail-on-increase: true diff --git a/.github/workflows/lower_bound.yml b/.github/workflows/lower_bound.yml new file mode 100644 index 00000000..2259a86b --- /dev/null +++ b/.github/workflows/lower_bound.yml @@ -0,0 +1,25 @@ +name: Dependency Lower-Bound Validation + +on: + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + validate: + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: read + steps: + - name: Checkout Codebase + uses: actions/checkout@v4 + + - name: Setup Dart SDK + uses: dart-lang/setup-dart@v1 + + - name: Run Lower-Bound Validator + uses: kevmoo/analytica.dart/packages/lower_bound@main + with: + format: 'github' + fail-on-error: 'true' diff --git a/analysis_options.yaml b/analysis_options.yaml index 0c746229..0b70f7ab 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -3,8 +3,6 @@ include: package:dart_flutter_team_lints/analysis_options.yaml analyzer: language: - strict-casts: true - strict-inference: true strict-raw-types: true linter: