native macOS codings agent orchestrator
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Tighten Swift format workflow

Closes #195

onevcat 06d55593 b7f1699f

+31 -10
+5 -4
AGENTS.md
··· 8 8 make run-app # Build and launch Debug app 9 9 make install-dev-build # Build and copy to /Applications (Debug) 10 10 make install-release # Build Release, sign locally, install to /Applications 11 - make format # Run swift-format only 12 - make lint # Run swiftlint only (fix + lint) 13 - make check # Run both format and lint 11 + make format-changed # Run swift-format on changed Swift files only 12 + make format # Run full-tree swift-format cleanup 13 + make lint # Run swiftlint only 14 + make check # Run changed-file format, swift-format lint, and swiftlint 14 15 make test # Run all tests 15 16 make log-stream # Stream app logs (subsystem: com.onevcat.prowl) 16 17 make build-cli # Build CLI (prowl) via SwiftPM ··· 103 104 - `swift-format` is the source of truth for trailing commas: multi-element collection literals keep trailing commas, while single-element collection literals may have them removed. 104 105 - SwiftLint runs in strict mode; never disable lint rules without permission 105 106 - Custom SwiftLint rule: `store_state_mutation_in_views` — do not mutate `store.*` directly in view files; send actions instead 106 - - Before creating a PR, run `make lint`. 107 + - Before creating a PR, run `make check`. Use `make format` only for intentional full-tree formatting cleanup. 107 108 108 109 ## UX Standards 109 110
+22 -3
Makefile
··· 19 19 VERSION ?= 20 20 BUILD ?= 21 21 XCODEBUILD_FLAGS ?= 22 + FORMAT_BASE_REF ?= origin/main 22 23 23 24 # Release-only analytics/crash credentials. Included from Config/Secrets.env if present, 24 25 # or overridable from the environment (e.g. CI). Debug builds skip SDK init regardless. ··· 28 29 PROWL_POSTHOG_HOST ?= 29 30 30 31 .DEFAULT_GOAL := help 31 - .PHONY: build-ghostty-xcframework ensure-ghostty sync-ghostty _check-ghostty-hash _record-ghostty-hash build-app build-cli build-cli-release embed-cli-debug embed-cli run-app install-dev-build install-release archive export-archive format lint check test test-cli-smoke test-cli-integration bump-version bump-and-release log-stream 32 + .PHONY: build-ghostty-xcframework ensure-ghostty sync-ghostty _check-ghostty-hash _record-ghostty-hash build-app build-cli build-cli-release embed-cli-debug embed-cli run-app install-dev-build install-release archive export-archive format format-changed format-lint lint check test test-cli-smoke test-cli-integration bump-version bump-and-release log-stream 32 33 33 34 help: # Display this help. 34 35 @-+echo "Run make with one of the following targets:" ··· 303 304 test-cli-integration: # Run CLI integration tests via SwiftPM 304 305 swift test --filter ProwlCLIIntegrationTests 305 306 306 - format: # Format code with swift-format (local only) 307 + format: # Format all Swift code with swift-format (full-tree cleanup) 307 308 swift-format -p --in-place --recursive --configuration ./.swift-format.json supacode supacodeTests 308 309 310 + format-changed: # Format Swift files changed from FORMAT_BASE_REF (default: origin/main) 311 + @base="$$(git merge-base HEAD "$(FORMAT_BASE_REF)" 2>/dev/null || git rev-parse HEAD)"; \ 312 + mapfile -t files < <( \ 313 + { \ 314 + git diff --name-only --diff-filter=ACMR "$$base" -- supacode supacodeTests; \ 315 + git ls-files --others --exclude-standard -- supacode supacodeTests; \ 316 + } | awk '/\.swift$$/' | sort -u \ 317 + ); \ 318 + if [ "$${#files[@]}" -eq 0 ]; then \ 319 + echo "No changed Swift files to format."; \ 320 + else \ 321 + printf 'Formatting %s changed Swift file(s) from %s\n' "$${#files[@]}" "$$base"; \ 322 + swift-format -p --in-place --configuration ./.swift-format.json "$${files[@]}"; \ 323 + fi 324 + 325 + format-lint: # Check Swift formatting without rewriting files 326 + swift-format lint --strict --recursive --configuration ./.swift-format.json supacode supacodeTests 327 + 309 328 lint: # Lint code with swiftlint 310 329 mise exec -- swiftlint lint --quiet --config .swiftlint.yml 311 330 312 - check: format lint # Format and lint 331 + check: format-changed format-lint lint # Format changed Swift files, then run swift-format lint and SwiftLint 313 332 314 333 log-stream: # Stream logs from the app via log stream 315 334 log stream --predicate 'subsystem == "com.onevcat.prowl"' --style compact --color always
+4 -3
README.md
··· 105 105 ### Develop & test 106 106 107 107 ```bash 108 - make check # swift-format + swiftlint 109 - make format # Format only 110 - make lint # Lint only 108 + make check # Format changed Swift files, then run swift-format lint + SwiftLint 109 + make format-changed # Format changed Swift files only 110 + make format # Full-tree Swift format cleanup 111 + make lint # SwiftLint only 111 112 make test # Run app/unit tests 112 113 make log-stream # Stream app logs (subsystem: com.onevcat.prowl) 113 114 ```