Commit Graph

13 Commits

Author SHA1 Message Date
Reid Baker c1542ccd77 Remove dart_hooks directory and references (#155) 2026-06-04 17:12:35 -04:00
Reid Baker 0ecf358b05 dart_skills_lint v0.3 prep: paperwork, diagnostics, recipes, RULES.md (#143)
Better lint diagnostics
New ci integrations 
Better test coverage of documentation. 
Pana integration
2026-05-22 14:31:44 -04:00
Reid Baker 5519cc09e1 Fix flaky Windows dart analyze; enforce dart_code_linter on test/ (#145)
* Fix flaky Windows dart analyze; enforce dart_code_linter on test/

Drop the dart_code_linter analyzer `plugin` registration from
analysis_options.yaml. When registered, `dart analyze` loaded the plugin
in a separate isolate that re-emitted the `dart_code_linter:` rules as
diagnostics over the plugin protocol for all non-excluded files. Delivery
of those diagnostics to the CLI is asynchronous and racy, so on slower
Windows CI runners they intermittently appeared and `--fatal-infos` turned
them fatal -- a flaky, platform-specific failure (#144). `dart analyze` now
enforces only core lints, deterministically across platforms.

The dedicated `dart run dart_code_linter:metrics` step is the deterministic
enforcement path for those rules; extend it to cover `test` as well as
`lib` so the test suite gets real, cross-platform coverage instead of the
accidental flaky version.

Fix the test-file violations this surfaces:
- avoid-late-keyword: replace `late Directory tempDir` fixtures with a
  shared createTempDir() helper that registers cleanup via addTearDown,
  removing duplicated tearDown blocks.
- avoid-dynamic: `dynamic noSuchMethod` -> `Object?`.
- avoid-redundant-async: drop the redundant async in a setUp.

Exclude prefer-match-file-name for test/**: test files must be named
`*_test.dart` and commonly hold several small fixture classes, so they
cannot match the rule's "file name == first class name" convention.

* Exclude avoid-late-keyword for tests instead of placeholder workaround

Address review feedback: rather than initializing tempDir fixtures to a
placeholder to satisfy avoid-late-keyword, exclude the rule for test/**
(as already done for prefer-match-file-name). `late` for fields assigned
in setUp is the idiomatic Dart test pattern. Reverts the createTempDir
helper and placeholder initializations; fixtures are plain `late` again.

The genuine, non-late fixes are kept: avoid-dynamic (Object? noSuchMethod)
and avoid-redundant-async (drop async from a sync setUp).

* Apply suggestion from @reidbaker
2026-05-22 09:55:52 -04:00
Reid Baker ffe7a5d6b2 Add CI line-coverage gate for dart_skills_lint (#142)
* Add CI line-coverage gate for dart_skills_lint

Collect coverage with `dart test --coverage`, convert to LCOV via the
already-transitive package:coverage, and enforce a minimum threshold in
CI with the VeryGoodOpenSource/very_good_coverage action (min 73%,
excluding *.g.dart). Adds contributor docs and a CHANGELOG entry. No new
pub dependencies and no custom coverage parsing to maintain.

* Document --ignore-files to exclude *.g.dart from local coverage
2026-05-21 21:15:26 -04:00
Reid Baker b12e69ad9e Add workflow, fix presubmits to run on workflow and run formatting with dart 3.12 2026-05-07 14:36:03 -04:00
Reid Baker a21ed42c99 Add cyclomatic complexity linting to dart_skills_lint codebase 2026-05-01 18:06:01 -04:00
Reid Baker 50520e2583 Fix PR failures: update workflow and format files 2026-04-10 15:03:46 -04:00
Reid Baker 4603098a56 Setup precommit linting, formatting, analyzing 2026-04-07 11:39:18 -04:00
dependabot[bot] e87ed2944a Bump actions/checkout from 4 to 6 in the github-actions group
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 4 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 10:24:05 +00:00
Jaime Wren 47f1911697 chore: restrict workflow trigger paths and working directory to tool/generator 2026-03-31 14:57:46 -07:00
Jaime Wren 90636dc21d Add Flutter integrate dart test into the CI workflow.
Expected to fail on initial PR creation, not out for review yet.

https://github.com/flutter/flutter/issues/183124
2026-03-02 13:08:39 -08:00
Jaime Wren 11b066705f Add a second GitHub actions workflow
Adds a GitHub Actions workflow to automatically run CI checks for the skills CLI tool. Tests are run on both Ubuntu, Mac and Windows for the `stable` and `dev` Dart SDK channels. The workflow triggers on pushes and pull requests to the main branch that modify the `tool/` directory, and runs:
- `dart pub get`
- `dart analyze --fatal-infos`
- `dart format` (on the dev channel only)
- `dart test` - is currently omitted as the test suite needs to be refactored to work properly without relying on real API keys in the CI environment

https://github.com/flutter/flutter/issues/183124
2026-03-02 10:41:30 -08:00
Jaime Wren 1d08991346 Create the initial github action for the skills repo
Same as content in dart-lang/ai: https://github.com/dart-lang/ai/commit/5ecadd3f967b6f663bb36504a589c5ae8ba2dab8
2026-02-27 12:30:22 -08:00