Add flutter_lints, analysis_options and CI - #124
Merged
Conversation
- Add analysis_options.yaml including package:flutter_lints/flutter.yaml (excludes generated *.g.dart; disables constant_identifier_names since enum values mirror Strava's snake_case wire format). - Add flutter_lints dev dependency. - Fix the 5 lints it surfaced: const field, redundant this., collection literal, leading-underscore local. - Add GitHub Actions CI (.github/workflows/ci.yml): on push/PR to master, pub get, verify generated code is current, analyze (--fatal-infos --fatal-warnings), and test; plus a job analyzing the example app. - Fix stray "gir" typo in README title; add CI badge. Analyzer clean (fatal-infos), tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The package's root `dart analyze` recursed into the standalone example app, failing CI on the (git-ignored) secret.dart. The example has its own analysis_options and CI job, so exclude example/** from the package analyzer. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The master merge reverted client.dart's header map back to a constructor invocation; restore the collection literal so analyze --fatal-infos passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
actions/checkout@v4 runs on the deprecated Node 20 runtime. v5 uses Node 24. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Establishes linting and continuous integration.
Linting
analysis_options.yamlincludingpackage:flutter_lints/flutter.yaml.**/*.g.dart.constant_identifier_names(enum values likeAuthenticationScope.read_allmirror Strava's snake_case wire format).flutter_lintsdev dependency.this., collection literal, leading-underscore local) — no behavior change.CI (
.github/workflows/ci.yml)On push / PR to
master:flutter pub get, verify generated*.g.dartis up to date,dart analyze --fatal-infos --fatal-warnings,flutter test.secret.dartfrom the template).Misc
girtypo in the README title; added a CI badge.All steps verified locally: analyze clean (fatal-infos), 19 tests green, no codegen drift.
🤖 Generated with Claude Code