ci: skip Deno lint/fmt/test when repo has no Deno targets#62
Open
hyperpolymath wants to merge 1 commit into
Open
ci: skip Deno lint/fmt/test when repo has no Deno targets#62hyperpolymath wants to merge 1 commit into
hyperpolymath wants to merge 1 commit into
Conversation
The rescript-deno-ci.yml "build" job has been failing on main since at
least 2026-05-30 because it runs `deno lint` and `deno fmt --check`
repo-wide. There is no Deno code in this repository — Deno was
reaching the Phoenix browser-bundled JS (assets/js/app.js) and the
Tailwind config, flagging legitimate Phoenix patterns (window.*,
prefer-const on top-level let, no-prototype-builtins). 24 errors,
no fix.
Changes
- New deno.json scopes both lint and fmt to anything outside the
Phoenix asset pipeline, build cache, deps cache and priv/static.
Documented inline so future maintainers know why it exists.
- rescript-deno-ci.yml gains a "Detect Deno target files" step that
decides whether the lint/fmt/test/check stages have work to do.
The four Deno stages now run conditionally on that detection so a
repo with no .ts files outside the asset pipeline is a clean no-op
instead of an exit-1 cascade.
Why guard at the workflow level instead of just deno.json
- `deno lint` exits non-zero with "No target files found" even when
deno.json scopes everything out. Without the workflow guard the
job would still be red.
Effect
- On this repo (no .ts files), the four Deno stages skip cleanly and
the build job goes green.
- The day a real Deno script lands somewhere outside assets/, the
detection flips to true and the stages run normally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 65 issues detected
View findings[
{
"reason": "Issue in boj-build.yml",
"type": "missing_timeout_minutes",
"file": "boj-build.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "missing_timeout_minutes",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "missing_timeout_minutes",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in codeql.yml",
"type": "missing_timeout_minutes",
"file": "codeql.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in container-policy.yml",
"type": "missing_timeout_minutes",
"file": "container-policy.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in dogfood-gate.yml",
"type": "missing_timeout_minutes",
"file": "dogfood-gate.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The `rescript-deno-ci.yml` build job has been failing on `main` since at least 2026-05-30 because it runs `deno lint` / `deno fmt --check` / `deno test` repo-wide. There is no Deno code in this repository — `deno lint` was reaching the Phoenix browser-bundled JS (`assets/js/app.js`) and the Tailwind config, flagging legitimate Phoenix patterns (`window.*`, `prefer-const` on top-level `let`, `no-prototype-builtins`). 24 errors with no constructive fix.
This is a pre-existing CI failure pattern that affects every PR; not introduced by any composer PR but currently red on PRs #60–#61 (and probably all open PRs).
Changes
Why guard at the workflow level instead of just `deno.json`
`deno lint` exits non-zero with "No target files found" even when `deno.json` scopes everything out. Without the workflow guard, the job would still be red.
Effect
Verification
Why a separate PR
This is a one-file workflow fix plus a one-file `deno.json`. Splitting it out lets you merge it directly to `main` (no composer-stack base) so every other PR's build check goes green on next push.
Generated with Claude Code.