mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-24 14:06:22 +01:00
Compare commits
3 Commits
a573cc11e0
...
4e3778823f
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e3778823f | |||
| e80ae41e1c | |||
| b5704b2228 |
@ -16,6 +16,12 @@ analyzer:
|
||||
- "**/*.g.dart"
|
||||
- "**/*.freezed.dart"
|
||||
- "test/**"
|
||||
- android/**
|
||||
- ios/**
|
||||
- web/**
|
||||
- windows/**
|
||||
- macos/**
|
||||
- linux/**
|
||||
|
||||
linter:
|
||||
rules:
|
||||
|
||||
@ -101,12 +101,10 @@ class _CalendarScreenState extends State<CalendarScreen> {
|
||||
|
||||
/// Opens [HistoryScreen] pre-filtered to the tapped day.
|
||||
void _onDaySelected(DateTime day) {
|
||||
unawaited(
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => HistoryScreen(
|
||||
initialDateRange: DateTimeRange(start: day, end: day),
|
||||
),
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => HistoryScreen(
|
||||
initialDateRange: DateTimeRange(start: day, end: day),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
/// screen: "I can open the diet app on my phone and fill meal I ate."
|
||||
library;
|
||||
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:developer';
|
||||
import 'package:crdt_sync/crdt_sync.dart';
|
||||
@ -323,35 +322,27 @@ class _LogMealScreenState extends State<LogMealScreen>
|
||||
}
|
||||
|
||||
void _onOpenHistory() {
|
||||
unawaited(
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(builder: (_) => const HistoryScreen()),
|
||||
),
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(builder: (_) => const HistoryScreen()),
|
||||
);
|
||||
}
|
||||
|
||||
void _onOpenCalendar() {
|
||||
unawaited(
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(builder: (_) => const CalendarScreen()),
|
||||
),
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(builder: (_) => const CalendarScreen()),
|
||||
);
|
||||
}
|
||||
|
||||
void _onOpenFoodBank() {
|
||||
unawaited(
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(builder: (_) => const FoodBankScreen()),
|
||||
),
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(builder: (_) => const FoodBankScreen()),
|
||||
);
|
||||
}
|
||||
|
||||
void _onOpenSettings() {
|
||||
unawaited(
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => SettingsScreen(httpClient: widget.httpClient),
|
||||
),
|
||||
Navigator.of(context).push<void>(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => SettingsScreen(httpClient: widget.httpClient),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -405,10 +405,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
|
||||
sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.19"
|
||||
version: "0.12.20"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -421,10 +421,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
|
||||
sha256: "307249ce4ff29d58a18e97f6345f539382eb9c9c29ecda628900f31de0443dd9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.18.0"
|
||||
version: "1.19.0"
|
||||
objective_c:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -723,10 +723,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
|
||||
sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.11"
|
||||
version: "0.7.12"
|
||||
timezone:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -819,10 +819,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
|
||||
sha256: f36f9f3be64c6198714492bb455c11056e33e2f85d9a0b676a48301e44fdcf47
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
version: "2.4.2"
|
||||
very_good_analysis:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
||||
@ -2,7 +2,7 @@ name: diet_guard_app
|
||||
description: "Companion phone app for diet_guard: log meals on the go."
|
||||
publish_to: 'none'
|
||||
|
||||
version: 1.0.7+1
|
||||
version: 1.0.8+1
|
||||
|
||||
environment:
|
||||
sdk: ^3.12.2
|
||||
|
||||
@ -13,14 +13,15 @@ enforced by a gate that fails the commit, not by a note anyone can ignore.
|
||||
Why: a file that cannot be read in one piece forces re-reads and partial edits,
|
||||
which is the single largest avoidable cost in an LLM-assisted workflow. Aim by
|
||||
churn, not size alone — refactoring pays where code is read and changed often
|
||||
(Fowler, *refactoring economic benefit*).
|
||||
(Fowler, _refactoring economic benefit_).
|
||||
|
||||
## Scope in this repo
|
||||
|
||||
- **56 files** currently exceed 250 lines (of 244 eligible files).
|
||||
- **22,916 lines** sit in violation; longest file is **1101 lines**.
|
||||
- **53 files** currently exceed 250 lines (of 222 eligible files).
|
||||
- **21,714 lines** sit in violation; longest file is **1101 lines**.
|
||||
|
||||
Exempt (do NOT split these):
|
||||
|
||||
- generated files — `*.g.dart`, `*.freezed.dart`, `*.gr.dart`, `**/l10n/generated/**`,
|
||||
anything with a `GENERATED` header
|
||||
- markup — `.html`, `.css`, `.scss`
|
||||
@ -32,25 +33,25 @@ Exempt (do NOT split these):
|
||||
ROI = lines x commits in the last year. Work top-down; a long file nobody edits
|
||||
has near-zero payoff and should not be first.
|
||||
|
||||
| lines | commits/yr | kind | file |
|
||||
|------:|-----------:|:-----|:-----|
|
||||
| 1101 | 12 | prose | `CLAUDE.md` |
|
||||
| 440 | 15 | code | `app/lib/screens/log_meal_screen.dart` |
|
||||
| 1052 | 6 | code | `app/lib/screens/history_screen.dart` |
|
||||
| 1017 | 6 | code | `app/test/screens/history_screen_test.dart` |
|
||||
| 498 | 10 | code | `diet_guard/_sync.py` |
|
||||
| 286 | 16 | code | `app/lib/screens/settings_screen.dart` |
|
||||
| 482 | 9 | code | `diet_guard/tests/test_sync.py` |
|
||||
| 694 | 5 | code | `app/test/services/sync_merge_test.dart` |
|
||||
| 472 | 7 | code | `diet_guard/_gatelock_ui.py` |
|
||||
| 466 | 7 | code | `diet_guard/_cli.py` |
|
||||
| 282 | 11 | code | `diet_guard/tests/conftest.py` |
|
||||
| 274 | 11 | code | `app/test/screens/settings_screen_test.dart` |
|
||||
| 362 | 8 | code | `app/test/screens/log_meal_screen_test.dart` |
|
||||
| 357 | 8 | code | `diet_guard/_state.py` |
|
||||
| 475 | 6 | code | `app/lib/services/sync_merge.dart` |
|
||||
| lines | commits/yr | kind | file |
|
||||
| ----: | ---------: | :---- | :------------------------------------------- |
|
||||
| 1101 | 12 | prose | `CLAUDE.md` |
|
||||
| 440 | 15 | code | `app/lib/screens/log_meal_screen.dart` |
|
||||
| 1052 | 6 | code | `app/lib/screens/history_screen.dart` |
|
||||
| 1017 | 6 | code | `app/test/screens/history_screen_test.dart` |
|
||||
| 498 | 10 | code | `diet_guard/_sync.py` |
|
||||
| 286 | 16 | code | `app/lib/screens/settings_screen.dart` |
|
||||
| 482 | 9 | code | `diet_guard/tests/test_sync.py` |
|
||||
| 694 | 5 | code | `app/test/services/sync_merge_test.dart` |
|
||||
| 472 | 7 | code | `diet_guard/_gatelock_ui.py` |
|
||||
| 466 | 7 | code | `diet_guard/_cli.py` |
|
||||
| 282 | 11 | code | `diet_guard/tests/conftest.py` |
|
||||
| 274 | 11 | code | `app/test/screens/settings_screen_test.dart` |
|
||||
| 362 | 8 | code | `app/test/screens/log_meal_screen_test.dart` |
|
||||
| 357 | 8 | code | `diet_guard/_state.py` |
|
||||
| 475 | 6 | code | `app/lib/services/sync_merge.dart` |
|
||||
|
||||
_(41 further files over 250 lines not listed — re-run the survey for the full set.)_
|
||||
_(38 further files over 250 lines not listed — re-run the survey for the full set.)_
|
||||
|
||||
## How to split
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user