Skip to content

feat: bring lint-herb up to full linter pattern - #85

Merged
ineedjet merged 2 commits into
mainfrom
feat/herb-full-linter-support
Jul 2, 2026
Merged

feat: bring lint-herb up to full linter pattern#85
ineedjet merged 2 commits into
mainfrom
feat/herb-full-linter-support

Conversation

@ineedjet

@ineedjet ineedjet commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

lint-herb had an action and a hook script but was missing from the standard linter pattern:

  • Add herb hook to .pre-commit-hooks.yaml (files regex, pass_filenames: false)
  • Add lint-herb step to lint-shared.yml gated on contains(inputs.linters, 'herb')
  • Add herb to setup-runtimes Ruby condition
  • Update README table — herb is now a first-class linters: key
  • Add herb to .pre-commit-config.yaml.example

- Add herb hook to .pre-commit-hooks.yaml (files: pattern, pass_filenames: false)
- Add lint-herb step to lint-shared.yml
- Add herb to setup-runtimes Ruby condition
- Update README table (herb now a first-class key, remove orphan note)
- Add herb to .pre-commit-config.yaml.example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 62e731098f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

contains(inputs.linters, 'rubocop') ||
contains(inputs.linters, 'erb-lint')
contains(inputs.linters, 'erb-lint') ||
contains(inputs.linters, 'herb')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Install Herb before enabling it in lint-shared

🤖 [rubykatzen/baseline]: When a consumer enables linters: herb, this new condition only runs ruby/setup-ruby with Bundler cache; it never installs the herb executable, and rubykatzen-baseline does not declare a Herb dependency in baseline.gemspec. The newly wired lint-herb action then invokes hooks/herb.sh, which runs bundle exec herb analyze . whenever the consuming repo has a Gemfile, so the advertised first-class herb path fails unless every consumer adds its own Herb gem. Please package/install Herb here before advertising it through lint-shared.yml.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Makes herb a first-class linter in baseline’s standard pattern so consuming repos can enable it via the shared workflow and pre-commit configuration like the other linters.

Changes:

  • Add a herb pre-commit hook definition and include it in the example pre-commit config.
  • Add herb as a supported linters: key and run lint-herb from lint-shared.yml when selected.
  • Ensure Ruby runtime setup runs when herb is selected.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Documents herb as a supported linters: key and adds it to the linter table.
.pre-commit-hooks.yaml Adds the herb hook definition (with file matching + pass_filenames: false).
.pre-commit-config.yaml.example Adds - id: herb to the example baseline hook list.
.github/workflows/lint-shared.yml Runs lint-herb when contains(inputs.linters, 'herb').
.github/actions/setup-runtimes/action.yml Installs Ruby (bundler-cache) when herb is selected.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread .pre-commit-hooks.yaml Outdated
- Add herb ~> 0.10 to baseline.gemspec so bundle exec herb works
  for consumers that install rubykatzen-baseline
- Remove redundant html\.herb from .pre-commit-hooks.yaml files regex
  (already matched by the herb alternative)
- Expand README Lints column to match what herb.sh actually scans

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ineedjet
ineedjet merged commit e0289a4 into main Jul 2, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 53568a7bce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md
uses: rubykatzen/baseline/.github/workflows/lint-shared.yml@VERSION
with:
linters: yamllint, pymarkdown, ruff, shellcheck, actionlint, rubocop, erb-lint, pre-commit
linters: yamllint, pymarkdown, ruff, shellcheck, actionlint, rubocop, erb-lint, herb, pre-commit

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the quick-start workflow and hooks in sync

🤖 [rubykatzen/baseline]: This quick-start workflow now includes both herb and pre-commit, but the pre-commit config block immediately below still lists hooks only through erb-lint. Copying the two README snippets as shown makes check-precommit-sync fail because it compares workflow linters, minus pre-commit, to the configured baseline hooks and sees herb missing; add the Herb hook to the README hook snippet or leave Herb out of the all-in-one workflow example.

Useful? React with 👍 / 👎.

if: contains(inputs.linters, 'rubocop')
- uses: rubykatzen/baseline/.github/actions/lint-erb-lint@v0.7
if: contains(inputs.linters, 'erb-lint')
- uses: rubykatzen/baseline/.github/actions/lint-herb@v0.7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run Herb through a Herb-aware setup action

🤖 [rubykatzen/baseline]: Fresh evidence after the earlier thread: the Herb gem dependency is now present, but this new lint step is still preceded by setup-runtimes@v0.7 in this workflow. For a release where v0.7 is not moved to this commit, such as a new minor release, a consumer that opts into only linters: herb executes the old setup action that does not enter the Ruby/Bundler setup path for Herb, then lint-herb@v0.7 runs bundle exec herb analyze ./herb analyze . without installing the gem, so the newly advertised linter can fail before analyzing templates.

Useful? React with 👍 / 👎.

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.

2 participants