Skip to content

feat(dart): Add shared analyzer config and dart format pre-commit hook#34

Open
nikzen wants to merge 2 commits into
feat/dart-devshell-cifrom
feat/dart-linting-hooks
Open

feat(dart): Add shared analyzer config and dart format pre-commit hook#34
nikzen wants to merge 2 commits into
feat/dart-devshell-cifrom
feat/dart-linting-hooks

Conversation

@nikzen

@nikzen nikzen commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Distribute shared analyzer configuration
  • Add dart format pre-commit hook

Stacked on top of feat/dart-devshell-ci.

Test plan

  • nix flake check passes
  • Pre-commit hook formats Dart files as expected
  • Shared analyzer config is applied in a sample Dart project

nikzen and others added 2 commits June 24, 2026 15:14
For every configured Dart project, place a managed
`analysis_options.standards.yaml` (always overwritten) and an initial,
repo-owned `analysis_options.yaml` that includes it, via filegen. This gives
the IDE analyzer, `dart analyze`, and the CI `dart_code_linter` step a single
shared source of truth for lint rules.

The template files live under `standards/dart/`, matching the existing
`standards/` convention for repo-owned data consumed by the Nix modules.

Co-authored-by: Cursor <cursoragent@cursor.com>
When the repository has Dart projects, register a `dart format` hook in the
root prek workspace and expose the pinned Dart SDK to the hook runner. Only
formatting runs in prek since it is dependency-free; the dependency-aware
checks (analyze, import_sorter, dart_code_linter) stay in the Dart CI
workflow, which resolves packages first.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nikzen nikzen closed this Jun 24, 2026
@nikzen nikzen reopened this Jun 24, 2026
@nikzen nikzen changed the base branch from main to feat/dart-devshell-ci June 24, 2026 15:15
@nikzen nikzen changed the title feat(dart): Add Dart/Flutter SDKs, dev shell, CI, linting and pre-commit hooks feat(dart): Add shared analyzer config and dart format pre-commit hook Jun 24, 2026
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