chore(lint): LeanCode's strict rules and a pre-push check
Some checks failed
Analyze / analyze (push) Has been cancelled
Format / format (push) Has been cancelled
Tests / test (push) Has been cancelled

The workspace root's analysis_options.yaml includes leancode_lint 27 and enables its analyzer plugin (rules for blocs, Equatable and Flutter layout); the server and the app include that file, while the generated client keeps its own options. Plugins can only be enabled at the root of a pub workspace and only reach packages whose options include the root file, which was verified before settling on this layout. Most rules are warnings, casts, inference and raw types are strict, and the check treats infos as fatal too. lints and flutter_lints are no longer needed.

tool/check.sh checks formatting, runs dart analyze --fatal-infos and the server tests; .git/hooks/pre-push links to it, so every push has to pass it. AGENTS.md describes the checklist and how to install the hook in a fresh clone.

Fixes for the new rules: package imports, run() returns Future<void>, the server setup as one cascade, a primary constructor for the app widget, a const and a redundant argument. The workspace root keeps its conventional name `_` with a documented ignore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-09-29 23:06:29 +02:00
commit 41e968c53e
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -9,6 +9,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "103.0.0"
analysis_server_plugin:
dependency: transitive
description:
name: analysis_server_plugin
sha256: c58b2a05b260a023eefd0848496ff6b113a318c6c95dad4215165a4bd54ae600
url: "https://pub.dev"
source: hosted
version: "0.3.18"
analyzer:
dependency: transitive
description:
@ -17,6 +25,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "13.3.0"
analyzer_plugin:
dependency: transitive
description:
name: analyzer_plugin
sha256: c2a75baf1657171cc7872db96a12b07e385873cf7a73f2b4f7638e9d0701ee53
url: "https://pub.dev"
source: hosted
version: "0.14.12"
animations:
dependency: transitive
description:
@ -193,6 +209,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.4.1"
dart_style:
dependency: transitive
description:
name: dart_style
sha256: "82ade9fc4273f29ed673e33166944465225b4f7fc5d4aaef48605cc751c18fc1"
url: "https://pub.dev"
source: hosted
version: "3.1.13"
dbus:
dependency: transitive
description:
@ -559,6 +583,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.2"
leancode_lint:
dependency: "direct dev"
description:
name: leancode_lint
sha256: "23148aecd1a7b9cbf1c435dc3423a86875f15f76ff020e13fa901138d428b444"
url: "https://pub.dev"
source: hosted
version: "27.0.0"
lints:
dependency: transitive
description:
@ -1420,6 +1452,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.4"
yaml_edit:
dependency: transitive
description:
name: yaml_edit
sha256: "07c9e63ba42519745182b88ca12264a7ba2484d8239958778dfe4d44fe760488"
url: "https://pub.dev"
source: hosted
version: "2.2.4"
sdks:
dart: ">=3.13.0 <4.0.0"
flutter: ">=3.44.4 <4.0.0"