feat(dart): Add shared analyzer config and dart format pre-commit hook#34
Open
nikzen wants to merge 2 commits into
Open
feat(dart): Add shared analyzer config and dart format pre-commit hook#34nikzen wants to merge 2 commits into
nikzen wants to merge 2 commits into
Conversation
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>
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.
Summary
dart formatpre-commit hookStacked on top of
feat/dart-devshell-ci.Test plan
nix flake checkpasses