Skip to content

swiftlint: run on every PR (drop paths filter)#70

Merged
dadachi merged 1 commit into
mainfrom
swiftlint-run-on-every-pr
May 8, 2026
Merged

swiftlint: run on every PR (drop paths filter)#70
dadachi merged 1 commit into
mainfrom
swiftlint-run-on-every-pr

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented May 8, 2026

Summary

The previous paths: filter only triggered SwiftLint on changes to .swiftlint.yml, the workflow itself, or *.swift files. Branch protection on main marks SwiftLint as a required check — when a PR doesn't touch any of those paths (e.g. a .xcscheme move, .gitignore tweak, README edit), SwiftLint never runs and the PR is stuck in BLOCKED state because the required check has no status.

Standard pattern for required checks is to run on every PR. Cost is ~30s per PR for an action that early-exits when no Swift files changed. Worth it to avoid silent merge-blockage on infrastructure PRs.

Surfaced by #69 (move default scheme to xcshareddata) — same kind of issue will hit any future non-Swift-touching PR.

Test plan

🤖 Generated with Claude Code

The previous `paths:` filter only triggered SwiftLint on changes to
.swiftlint.yml, the workflow itself, or *.swift files. But the branch-
protection rule on main marks SwiftLint as a required check — when a
PR doesn't touch any of those paths (e.g. a .xcscheme move,
gitignore tweak, README edit), SwiftLint never runs and the PR is
stuck in BLOCKED state because the required check has no status.

Standard pattern for required checks is to run on every PR. The cost
is ~30s per PR for an action that early-exits on no-Swift-changed.
Worth it to avoid silent merge-blockage on infrastructure PRs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dadachi dadachi merged commit b15dfc2 into main May 8, 2026
2 checks passed
@dadachi dadachi deleted the swiftlint-run-on-every-pr branch May 8, 2026 23:18
dadachi added a commit that referenced this pull request May 8, 2026
* Make default scheme shared so generated projects ship with one

Move NativeAppTemplate.xcscheme from xcuserdata/<user>/xcschemes/ to
xcshareddata/xcschemes/. xcuserdata is gitignored (correctly — it
holds per-developer Xcode state) which means anyone cloning fresh
opens the project without a scheme until Xcode auto-creates a default
one. The auto-default omits the run-time environment variable
injection (NATIVEAPPTEMPLATE_API_DOMAIN etc.) the substrate relies on,
so the app falls back to api.nativeapptemplate.com and dev workflows
break silently.

Shared schemes are conventional for any project meant to be cloned by
others — no per-user state in the file, just the build/run/test
configuration. Promoting the default scheme costs nothing and makes
the substrate work out-of-the-box for fresh clones, including the
nativeapptemplate-agent code generator's ./out/<slug>/ios/ outputs
(the agent's iOS worker copies the substrate but skips xcuserdata; it
does NOT skip xcshareddata, so the moved scheme rides along).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* trigger CI re-run after #70 (swiftlint workflow fix) landed

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant