Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/linter.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ strings to use Super-Linter's native `VALIDATE_*=true` allowlist, including
commitlint. Do not mix `true` and `false` validator flags in that mode.

CI uses Git change detection according to `lint-all` and publishes GitHub
summaries. Local runs use filesystem discovery by default. The workflow also
summaries. Scheduled (`schedule`) and manual (`workflow_dispatch`) runs disable
commitlint by default because these events do not provide a commit range.
Explicit `linter-env` validator settings take precedence.
Local runs use filesystem discovery by default. The workflow also
installs project dependencies when `package.json` declares Prettier plugins;
install those dependencies before running the image locally.

Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ jobs:
environment.set(key, line.slice(separatorIndex + 1));
}

// These events have no commit range for commitlint to validate.
// FIXME: https://github.com/super-linter/super-linter/issues/7968
if (["schedule", "workflow_dispatch"].includes(context.eventName)) {
// An allowlist already excludes commitlint unless explicitly enabled.
const hasValidatorAllowlist = [...environment].some(([key, value]) =>
key.startsWith("VALIDATE_") && key !== "VALIDATE_ALL_CODEBASE" && value.toLowerCase() === "true"
);
if (!environment.has("VALIDATE_GIT_COMMITLINT") && !hasValidatorAllowlist) {
environment.set("VALIDATE_GIT_COMMITLINT", "false");
}
}

for (const [key, value] of environment) {
core.exportVariable(key, value);
}
Expand Down
Loading