diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 335f31b..edce6fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,8 +32,8 @@ jobs: git ls-files | grep -E '^(lib|test)/.*\.dart$' \ | xargs dart format --output=none --set-exit-if-changed - # info 수준 린트는 실패로 치지 않는다(warning/error 만 게이트). - - run: flutter analyze --no-fatal-infos + # info 까지 게이트 — 잔여 info 를 정리하고 --no-fatal-infos 를 걷어냈다(#160). + - run: flutter analyze - run: flutter test --coverage @@ -60,12 +60,12 @@ jobs: # (17.8% → 17.7%). 그때 할 일은 하한 조정이 아니라 새 코드에 테스트를 쓰는 것이다. # 정말 못 지키겠으면 하한을 고치지 말고 왜 예외인지를 PR 에 적고 리뷰를 받는다. # ADR 0007 참고. - - name: 커버리지 요약·게이트(≥18%) + - name: 커버리지 요약·게이트(≥24%) shell: bash run: | awk -F'[:,]' '/^DA:/{t++; if($3>0) h++} END{pct=h*100/t; printf "라인 커버리지 %.1f%% (%d/%d)\n", pct, h, t; - exit (pct>=18)?0:1}' \ + exit (pct>=24)?0:1}' \ coverage/lcov.info | tee -a "$GITHUB_STEP_SUMMARY" # PR 코멘트 — 전체 % + **이 PR 이 바꾼 파일들의 커버리지**. 베이스라인 diff --git a/README.md b/README.md index ec6d88d..6d1e2a0 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ GPS 동네 인증을 기반으로 이웃과 반려동물 산책 메이트를 찾 | **`dart:io` 금지 게이트** | 웹에서 **컴파일은 되지만** `Platform.isIOS` 등이 런타임에 `UnsupportedError` 를 던진다 — 빌드로는 안 잡히고 흰 화면으로만 드러난다 | [`ci.yml`](.github/workflows/ci.yml) | | **마이그레이션 리플레이** | 빈 DB 에 마이그레이션 175건을 처음부터 재생해 운영 스냅샷과 대조 — **마이그레이션 없이 운영 DB 에 직접 친 DDL 이 즉시 빨간불** | [`pmdb/db-tests.yml`](https://github.com/seizeh/pmdb/blob/main/.github/workflows/db-tests.yml) | | **pgTAP 불변식 16종** | 자기초대 차단·팔로우 얼굴 분리·채팅 삭제 권한 등을 **DB 레벨**에서 검증(클라이언트가 아니라) | [`pmdb/tests/`](https://github.com/seizeh/pmdb/tree/main/supabase/tests) | -| **커버리지 래칫 (≥18%)** | 달성 못 할 80% 를 적어 두는 대신 **현재값을 하한으로 고정** — 떨어지면 실패 | [`ci.yml`](.github/workflows/ci.yml) | +| **커버리지 래칫 (≥24%)** | 달성 못 할 80% 를 적어 두는 대신 **현재값을 하한으로 고정** — 떨어지면 실패 | [`ci.yml`](.github/workflows/ci.yml) | | **`catch (_)` 래칫 (≤103)** | 예외를 삼킨 판단이 런타임에 흔적을 안 남기는 것 — 세 등급 중 하나를 쓰게 강제한다([정책](docs/error-policy.md)) | [`ci.yml`](.github/workflows/ci.yml) | | **파일 크기 래칫 (≤1,970줄)** | God Widget 이 더 자라는 것 — 현재 최대 파일을 상한으로 고정하고 분리한 만큼 내린다 ([#155](https://github.com/seizeh/pmdart/issues/155)) | [`ci.yml`](.github/workflows/ci.yml) | | 웹 빌드 게이트 | 앱 변경이 웹 번들을 조용히 깨는 것 | [`ci.yml`](.github/workflows/ci.yml) | @@ -181,7 +181,7 @@ flutter run -d chrome # 웹 # 검사 & 테스트 (CI 와 동일) dart format --output=none --set-exit-if-changed lib test -flutter analyze --no-fatal-infos +flutter analyze flutter test --coverage ``` diff --git a/lib/data/mock_data.dart b/lib/data/mock_data.dart deleted file mode 100644 index 88c74d7..0000000 --- a/lib/data/mock_data.dart +++ /dev/null @@ -1,8 +0,0 @@ -/// (구) 화면 개발용 목 데이터 파일 — 실데이터 전환이 끝나 내용은 모두 제거됐다. -/// 라이브 심볼은 이동: 펫 모델 → `models/pet.dart`, 라벨/시간 유틸 → `utils/labels.dart`. -/// -/// 진행 중 작업(post_create_screen WIP)이 이 경로로 `categoryLabel` 을 import -/// 하고 있어 재수출 심(shim)으로만 남겨 둔다 — 해당 작업 정리 시 함께 삭제할 것. -library; - -export '../utils/labels.dart' show categoryLabel; diff --git a/lib/screen/post_create_screen.dart b/lib/screen/post_create_screen.dart index 59bb5fc..c8a763b 100644 --- a/lib/screen/post_create_screen.dart +++ b/lib/screen/post_create_screen.dart @@ -5,7 +5,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart' show SystemUiOverlayStyle; import 'package:image_picker/image_picker.dart' show XFile; -import '../data/mock_data.dart' show categoryLabel; import '../models/community.dart'; import '../models/profile.dart'; import '../motion/motion.dart'; @@ -18,6 +17,7 @@ import '../services/profile_repository.dart'; import '../services/session.dart'; import '../services/storage_service.dart'; import '../theme/app_palette.dart'; +import '../utils/labels.dart' show categoryLabel; import '../widgets/attachment_progress.dart'; import '../widgets/blob_background.dart'; import '../widgets/media_widgets.dart' show VideoPlayBadge, openVideoPlayer;