Skip to content

ci(lint): the SPDX rule stops at an indented workflow body also - #98

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/spdx-rule-indented-body
Nov 10, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
claude/spdx-rule-indented-body

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

The SPDX check of the workflow linter reads the leading comment block of each workflow file and stops at the first line of the body. Its stop condition was /^[^#[:space:]]/: a line that starts in column 1. A workflow with an indented body has no such line, so a licence line after the body passed the check.

The template repaired this in rsr-template-repo pull request 323. This repository still had the earlier form.

Changes

  • .github/workflows/workflow-linter.yml, 1 line: the stop condition becomes /^[[:space:]]*[^#[:space:]]/.

The change was made with the gitbot-fleet recipe fix-workflow-linter-spdx-rule.sh (gitbot-fleet pull request 662), run by hand on this checkout. The fleet does not dispatch recipes at this time, so a pull request by hand is the way.

RSR Quality Checklist

Required

  • Linter is clean: each of the 30 workflow files of this repository passes the new rule (see Testing).
  • No banned language patterns
  • SPDX license headers present on all new/modified source files
  • No secrets, credentials, or .env files included
  • Not applicable: tests, formatter, unsafe blocks, banned functions. No source file changes.

Testing

  • fix-workflow-linter-spdx-rule.sh --check: 1 target before the change, 0 after.
  • The Check SPDX Headers step is identical to the step of the template at main (0208563), 19 lines.
  • The new rule, run on each of the 30 workflow files of this repository: 0 files fail. So the stricter rule does not make the lint of this repository red.
  • The recipe has a test for this form in gitbot-fleet (tests/template-drift-recipes-test.sh): a file with a licence line after an indented body passes the old form and fails the new one.

Not verified here: the lint-workflows check in CI. It runs on this pull request.


Generated by Claude Code

The SPDX check of the workflow linter reads the leading comment block of
each workflow and stops at the first line of the body. Its stop condition
was `/^[^#[:space:]]/`: a line that starts in column 1. A workflow with an
indented body thus had no stop line, and a licence line after the body
passed the check.

The stop condition is now `/^[[:space:]]*[^#[:space:]]/`, the rule of the
template (rsr-template-repo pull request 323). 1 line changes.

The change was made with the gitbot-fleet recipe
`fix-workflow-linter-spdx-rule.sh` (gitbot-fleet pull request 662), run by
hand on this checkout. The fleet does not dispatch recipes at this time.

Each of the 30 workflow files of this repository passes the new rule.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZmiFSCoB3UR9Kk56rK
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • SPDX header validation now treats indented, non-comment content as the end of the leading comment block. This makes checks more consistent when files contain content that is indented before a valid header, helping identify headers that do not appear at the expected position.

The SPDX-header check now ends the leading comment block when it encounters non-whitespace, non-comment content, including indented content.

Changes: SPDX lint

Layer / File(s) Summary
Leading comment boundary
.github/workflows/workflow-linter.yml
The SPDX check now treats indented non-comment content as the end of the leading comment block.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Possibly related PRs

  • hyperpolymath/system-et#90: PR #90 moves SPDX headers to the first line of workflow files. Both changes address workflow SPDX linting.
  • hyperpolymath/system-et#92: PR #92 changes where the SPDX identifier can appear in the leading comment block. This PR defines where that block ends.
Merge Risk: Minimal · up to 0ae3f

The SPDX check now stops at indented body content. No merge-blocking issue was identified.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 10, 2026 20:01
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 5c2e194 into main Nov 10, 2026
32 of 33 checks passed
@hyperpolymath
hyperpolymath deleted the claude/spdx-rule-indented-body branch November 10, 2026 20:03
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.

3 participants