Skip to content

Add flutter_lints, analysis_options and CI - #124

Merged
dreampowder merged 5 commits into
masterfrom
lints-and-ci
Jun 1, 2026
Merged

Add flutter_lints, analysis_options and CI#124
dreampowder merged 5 commits into
masterfrom
lints-and-ci

Conversation

@dreampowder

Copy link
Copy Markdown
Owner

Establishes linting and continuous integration.

Linting

  • analysis_options.yaml including package:flutter_lints/flutter.yaml.
    • Excludes generated **/*.g.dart.
    • Disables constant_identifier_names (enum values like AuthenticationScope.read_all mirror Strava's snake_case wire format).
  • flutter_lints dev dependency.
  • Fixed the 5 lints it surfaced (const field, redundant this., collection literal, leading-underscore local) — no behavior change.

CI (.github/workflows/ci.yml)

On push / PR to master:

  • package jobflutter pub get, verify generated *.g.dart is up to date, dart analyze --fatal-infos --fatal-warnings, flutter test.
  • example job — analyze the example app (with a generated secret.dart from the template).

Misc

  • Fixed a stray gir typo in the README title; added a CI badge.

All steps verified locally: analyze clean (fatal-infos), 19 tests green, no codegen drift.

Note: a repo-wide dart format was intentionally left out to avoid a 40+ file churn and conflicts with open PR #123. Formatting can be enforced in a follow-up once outstanding PRs land.

🤖 Generated with Claude Code

dreampowder and others added 5 commits June 1, 2026 23:12
- 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>
@dreampowder
dreampowder merged commit 04f5c55 into master Jun 1, 2026
2 checks passed
@dreampowder
dreampowder deleted the lints-and-ci branch June 1, 2026 20:27
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