ci: gate CI + publishing on a perfect pana score (160/160)#16
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds pana (the analyzer behind pub.dev's "pub points") as a quality gate:
ci.yml) — a newpanamatrix job runs both packages throughpana --exit-code-threshold 0, failing the PR if any pub point is lost.publish.yml) — the same gate runs beforedart 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:
dart formatlibnot clean under pana's (latest-language) formatterBoth 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 anddart analyze, so it satisfies pana and the existing config-aware CI format step.Caveat (by design)
--exit-code-threshold 0means 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