Skip to content

Add CI lint for single-command bash blocks#563

Merged
retlehs merged 5 commits intodocsfrom
lint-bash-blocks
Mar 2, 2026
Merged

Add CI lint for single-command bash blocks#563
retlehs merged 5 commits intodocsfrom
lint-bash-blocks

Conversation

@retlehs
Copy link
Member

@retlehs retlehs commented Mar 2, 2026

Summary

  • Adds CLAUDE.md with convention that bash code blocks must contain exactly one command (the roots.io front-end Markdown rendering only supports single lines for our clipboard copy functionality, and to account for bash blocks with and without $ prefixes)
  • Adds a GitHub Action that checks all markdown files on PRs and fails if any bash block has multiple commands
image

🤖 Generated with Claude Code

retlehs and others added 5 commits March 2, 2026 11:20
The roots.io front-end clipboard copy button only supports single lines
in bash code blocks. This adds a CLAUDE.md convention and a CI check
to catch multi-line bash blocks in markdown files on PRs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split multi-line bash blocks in bedrock and trellis docs to match
the single-command-per-block convention. Exclude CLAUDE.md from the
lint since it contains an intentional bad example.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Strip ./ prefix from file paths so GitHub can match them to PR files.
Also simplified the workflow to a single awk pass per file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@retlehs retlehs self-assigned this Mar 2, 2026
@retlehs retlehs merged commit 2fd176f into docs Mar 2, 2026
5 checks passed
@retlehs retlehs deleted the lint-bash-blocks branch March 2, 2026 17:32
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