← ClaudeAtlas

lint-and-style-configlisted

Enforces a strict analysis_options.yaml built on very_good_analysis with strict-casts/strict-raw-types, a fixed set of silence-producing bug classes promoted to error (unawaited_futures, discarded_futures, empty_catches, use_build_context_synchronously, cancel_subscriptions, close_sinks, avoid_dynamic_calls, exhaustive_cases, avoid_print), dart format as the sole whitespace authority, generated-file excludes mirrored to coverage, and line-scoped-only suppression discipline; teaches the version-pinned-include trap (a missing include silently disables all rules), the errors-only-re-ranks-vs-linter-enables mechanic, and the sealed-switch analyze-vs-compile gap. Use when editing analysis_options.yaml, adding or disabling a lint, writing an `// ignore:`/`// ignore_for_file:`, bumping the Dart SDK or very_good_analysis version, wiring riverpod_lint, or explaining why discarded_futures, use_build_context_synchronously, close_sinks, or missing_provider_scope fires.
zakariaf/CatchLaw · ★ 0 · Code & Development · score 58
Install: claude install-skill zakariaf/CatchLaw
# Lint & Style Config Style is not taste; it is toolchain-enforced. `dart format` owns whitespace, the analyzer owns correctness, and a small set of **silence-producing bug classes** are promoted to build-failing errors. This skill governs the `analysis_options.yaml` itself and the mechanics that decide whether it actually does anything. Applies whenever you edit that file, add or silence a lint, or bump the SDK/ruleset. Read the reference for the task at hand: - `references/rule-catalog.md` — every promoted rule and its bug class, the deliberate downgrades, the contested `public_member_api_docs` call, and the complexity-limit table. - `references/config-mechanics.md` — the include-pin trap, `errors:`-re-ranks vs `linter:`-enables, sealed-switch analyze-vs-compile, coverage mirroring, the riverpod_lint plugin, and suppression discipline. Copy `examples/analysis_options.yaml` into the package root as the starting config. Run `scripts/verify-include-pin.sh` and `scripts/lint-gates.sh` before a PR. ## Non-negotiable rules 1. **`dart format` is the only whitespace authority.** Never hand-format, never argue with it, never `// dart format off` except around a hand-laid table with a justifying comment. CI runs `dart format --set-exit-if-changed .`. 2. **Build on `very_good_analysis`, pinned to the version-numbered include.** Never the bare `analysis_options.yaml` — a `pub upgrade` must not silently change what counts as an error. VGA already sets `strict-c