chore: dev tooling — strict lints, git hooks, commitlint, contributing guide - #2
Open
shroominic wants to merge 1 commit into
Open
chore: dev tooling — strict lints, git hooks, commitlint, contributing guide#2shroominic wants to merge 1 commit into
shroominic wants to merge 1 commit into
Conversation
…nt, contributing Set up production-grade local dev tooling for the Flutter app: - Lints: extend very_good_analysis (replaces bare flutter_lints) with a few pre-existing-violation rules baselined as documented follow-ups. analyze is green. - Formatting: standardize on dart format (pre-commit enforced). - Git hooks via Lefthook (lefthook.yml): pre-commit format+analyze on staged Dart, commit-msg commitlint (Conventional Commits), pre-push flutter test. - commitlint.config.mjs with app/package-area scopes. - scripts/install-hooks.sh + Makefile (make setup) to install hooks without npm. - CONTRIBUTING.md documenting setup, commands, lint/format, hooks, commits. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.
Production-grade local dev tooling for the OpenGlucose Flutter app. Tooling/config only — no app feature code touched.
What's added
Strict linting (
openhealth/analysis_options.yaml)very_good_analysis(added to dev_dependencies; replaces bareflutter_lints).public_member_api_docsdisabled (this is an app, not a published package).dart fix --apply).flutter analyzeis green.Formatting
dart formatas the single source of truth; enforced by the pre-commit hook.Git hooks via Lefthook (
lefthook.yml)dart format --set-exit-if-changed+flutter analyzeon staged Dart files (scoped toopenhealth/).commitlint(Conventional Commits) vianpx— no npm project needed.flutter test.Commitlint (
commitlint.config.mjs)app,ble,aidex,core,ui,ios,android,docs,deps,ci,repo).Hook installer (no npm in a Flutter repo)
scripts/install-hooks.shinstalls Lefthook (Homebrew /go installfallback) thenlefthook install.Makefilewithmake setup(install hooks) plusformat,format-check,analyze,test,check.Docs (
CONTRIBUTING.md)Verification
flutter analyze→ No issues found.dart format --output=none --set-exit-if-changed .→ clean.flutter test→ 17 passed (incl. widget tests; the suite was already meaningful, so no smoke test was needed).How to install the hooks
make setup # or: ./scripts/install-hooks.shRequires Lefthook (auto-installed) and Node.js (for the commit-msg commitlint hook, run via npx).