Skip to content

Commit 321c8c6

Browse files
pedropombeiroclaude
andcommitted
refactor(pre-commit): use bundle exec for standardrb with single version source
Use BUNDLE_GEMFILE to run standardrb via bundle exec, ensuring the pre-commit hook uses the version defined in the Gemfile. This makes Renovate updates simpler - it only needs to update the Gemfile, and the pre-commit hook automatically uses that version. Benefits: - Single source of truth for standard version (Gemfile only) - Simpler Renovate updates (one file instead of two) - Consistent version across all tools using the Gemfile Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 749706f commit 321c8c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ repos:
6464
hooks:
6565
- id: standardrb
6666
name: standardrb (check)
67-
entry: standardrb
67+
entry: bash -c 'BUNDLE_GEMFILE=~/.shellrc/zshrc.d/functions/scripts/Gemfile bundle exec standardrb "$@"' --
6868
language: system
6969
types: [ruby]
7070
- id: standardrb-fix
7171
name: standardrb (fix)
72-
entry: standardrb --fix
72+
entry: bash -c 'BUNDLE_GEMFILE=~/.shellrc/zshrc.d/functions/scripts/Gemfile bundle exec standardrb --fix "$@"' --
7373
language: system
7474
types: [ruby]
7575
stages: [manual]

0 commit comments

Comments
 (0)