-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (50 loc) · 2.41 KB
/
Copy pathMakefile
File metadata and controls
66 lines (50 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# ─────────────────────────────────────────────────────────────────
# Flutter Project – Common Commands
# Usage: make <target>
# ─────────────────────────────────────────────────────────────────
.PHONY: help get clean format format-check analyze test coverage lint ci
# Default target
help:
@echo ""
@echo " Usage: make <target>"
@echo ""
@echo " Dev"
@echo " get flutter pub get"
@echo " format auto-format all Dart files"
@echo " analyze flutter analyze"
@echo " test run tests (randomised order)"
@echo " coverage run tests + generate HTML coverage report"
@echo ""
@echo " CI"
@echo " lint format-check + analyze"
@echo " ci full CI pipeline (lint + test)"
@echo ""
@echo " Misc"
@echo " clean flutter clean"
@echo ""
# ── Dependencies ──────────────────────────────────────────────────
get:
flutter pub get
# ── Code Quality ──────────────────────────────────────────────────
format:
dart format .
format-check:
dart format --set-exit-if-changed .
analyze:
flutter analyze --fatal-infos
lint: format-check analyze
# ── Tests ─────────────────────────────────────────────────────────
test:
flutter test --test-randomize-ordering-seed random
coverage:
flutter test --coverage --test-randomize-ordering-seed random
genhtml coverage/lcov.info --output-directory coverage/html --quiet
@echo "Coverage report generated:"
@echo "coverage/html/index.html"
# ── Full CI pipeline (mirrors GitHub Actions) ─────────────────────
ci: lint test
@echo ""
@echo "All CI checks passed!"
# ── Misc ──────────────────────────────────────────────────────────
clean:
flutter clean