Skip to content

Commit a93e703

Browse files
committed
fix: address Copilot review comments on PR #259
- Add set -o pipefail + exit code capture to test and analyze tasks so pipe through tee doesn't mask flutter test/analyze exit codes - Fix StorageService docs: there is no StorageService class; the actual classes are FavoritesService, RatingsService, FestivalStorageService - Add prefer_const_declarations to linter rules list (was missing) - Reword list as "among others" to avoid implying exhaustiveness - Fix copilot-instructions.md accessibility reference: CLAUDE.md → AGENTS.md (CLAUDE.md is now just an @AGENTS.md import) https://claude.ai/code/session_015rZFtTwYwLn5Z8zQrk4sgM
1 parent 8fa967c commit a93e703

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Full reference: [`docs/code/api/`](../docs/code/api/)
144144

145145
### Accessibility
146146

147-
Every interactive element needs a `Semantics` wrapper with a `label`. See [`docs/code/accessibility.md`](../docs/code/accessibility.md) and `CLAUDE.md` for full requirements and examples.
147+
Every interactive element needs a `Semantics` wrapper with a `label`. See [`docs/code/accessibility.md`](../docs/code/accessibility.md) and [`AGENTS.md`](../AGENTS.md) for full requirements and examples.
148148

149149
### Error Handling
150150

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The app uses a layered architecture:
4343
**Infrastructure** (`lib/services/`):
4444
- `BeerApiService` — HTTP API calls
4545
- `FestivalService` — festival metadata
46-
- `StorageService` — SharedPreferences; contains `FavoritesService`, `RatingsService`, `FestivalStorageService`
46+
- `FavoritesService`, `RatingsService`, `FestivalStorageService` — SharedPreferences (all in `storage_service.dart`)
4747
- `TastingLogService` — tasting log persistence
4848
- `EnvironmentService` — environment/config detection
4949
- `AnalyticsService` — Firebase Analytics/Crashlytics
@@ -150,7 +150,7 @@ Container(
150150
)
151151
```
152152

153-
**Linter rules enforced**: `prefer_const_constructors`, `prefer_final_locals`, `prefer_final_fields`, `avoid_print`, `prefer_single_quotes`, `sort_child_properties_last`, `use_key_in_widget_constructors`.
153+
**Linter rules enforced** (among others): `prefer_const_constructors`, `prefer_const_declarations`, `prefer_final_locals`, `prefer_final_fields`, `avoid_print`, `prefer_single_quotes`, `sort_child_properties_last`, `use_key_in_widget_constructors`.
154154

155155
---
156156

mise.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ outputs = ['test/**/*.mocks.dart']
3131
description = "Run all Flutter tests (output saved to $TEST_LOG, or set TEST_LOG to reuse a path)"
3232
depends = ['generate']
3333
run = '''
34+
set -o pipefail
3435
TEST_LOG="${TEST_LOG:-$(mktemp /tmp/test-XXXXXX.log)}"
3536
echo "TEST_LOG=$TEST_LOG"
36-
flutter test 2>&1 | tee "$TEST_LOG"
37+
flutter test 2>&1 | tee "$TEST_LOG"; EXIT_CODE=$?
3738
echo "---"
3839
echo "Grep with: grep -n 'FAILED\|ERROR' $TEST_LOG"
40+
exit $EXIT_CODE
3941
'''
4042

4143
[tasks.check]
@@ -62,11 +64,13 @@ echo "To view HTML report, install lcov and run: genhtml coverage/lcov.info -o c
6264
description = "Run Flutter code analysis (output saved to $ANALYZE_LOG, or set ANALYZE_LOG to reuse a path)"
6365
depends = ['generate']
6466
run = '''
67+
set -o pipefail
6568
ANALYZE_LOG="${ANALYZE_LOG:-$(mktemp /tmp/analyze-XXXXXX.log)}"
6669
echo "ANALYZE_LOG=$ANALYZE_LOG"
67-
flutter analyze --no-fatal-infos 2>&1 | tee "$ANALYZE_LOG"
70+
flutter analyze --no-fatal-infos 2>&1 | tee "$ANALYZE_LOG"; EXIT_CODE=$?
6871
echo "---"
6972
echo "Grep with: grep -n 'error\|warning' $ANALYZE_LOG"
73+
exit $EXIT_CODE
7074
'''
7175

7276
[tasks."validate:festivals"]

0 commit comments

Comments
 (0)