Skip to content

ci: gate CI + publishing on a perfect pana score (160/160)#16

Merged
gdelataillade merged 3 commits into
mainfrom
ci-pana-quality-gate
Jun 29, 2026
Merged

ci: gate CI + publishing on a perfect pana score (160/160)#16
gdelataillade merged 3 commits into
mainfrom
ci-pana-quality-gate

Conversation

@gdelataillade

Copy link
Copy Markdown
Collaborator

What

Adds pana (the analyzer behind pub.dev's "pub points") as a quality gate:

  • CI (ci.yml) — a new pana matrix job runs both packages through pana --exit-code-threshold 0, failing the PR if any pub point is lost.
  • Publish (publish.yml) — the same gate runs before dart pub publish, so a tag whose packages don't score 160/160 cannot reach pub.dev.

Why 160/160 wasn't reached before

pana flagged both packages; the fixes are in this branch:

Package Was Issue Fix
mock 140 pubspec description 246 chars (max 180) shortened to 160
mock new method-channel test not formatted dart format
both 150 lib not clean under pana's (latest-language) formatter reformatted to the latest style

Both packages now score 160/160 (verified locally with pana 0.23.13).

The reformat note: pana formats with the SDK's latest language version (no resolved package_config), which differed from the resolved-3.9 output on a few files. The latest-formatter output is also accepted by the resolved formatter and dart analyze, so it satisfies pana and the existing config-aware CI format step.

Caveat (by design)

--exit-code-threshold 0 means any future point loss blocks CI/publish — including ecosystem-driven drops (a dependency going stale, a new pana check, or the built-in-Kotlin penalty pana currently only warns about). That's the intended "must be perfect" behavior; relax the threshold if it becomes noisy.

🤖 Generated with Claude Code

gdelataillade and others added 3 commits June 29, 2026 09:38
- Shorten pubspec description to 160 chars (pana requires 60–180).
- dart format the method-channel test (the prior format pass only
  covered lib/, not test/).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pana formats with the SDK's latest language version (no resolved
package_config), which differs from the resolved-3.9 output on a few
files. The latest-formatter output is also accepted by the resolved
formatter and `dart analyze`, so this satisfies both pana and the
existing config-aware CI format check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- CI: new `pana` matrix job (both packages) runs pana with
  --exit-code-threshold 0, failing the PR if any pub point is lost.
- Publish: add the same pana gate before `dart pub publish`, so a tag
  whose packages don't score 160/160 cannot reach pub.dev.

The two preceding commits (mock description shorten + latest dart
format) bring both packages to 160/160 so the gate passes today.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gdelataillade gdelataillade merged commit 9ce89f8 into main Jun 29, 2026
11 checks passed
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.

1 participant