Skip to content

Commit ec77b5c

Browse files
Pre-commit installation
* Fix linting workflow to do necessary setups * Ensure we run rubocop the right way
1 parent 78c9e2a commit ec77b5c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/lint.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,21 @@ jobs:
6464

6565
steps:
6666
- uses: actions/checkout@v4
67+
- uses: actions/setup-node@v4
68+
with:
69+
node-version-file: .tool-versions
70+
cache: yarn
71+
- uses: ruby/setup-ruby@v1
72+
with:
73+
bundler-cache: true
6774
- uses: hashicorp/setup-terraform@v3
6875
with:
6976
terraform_version: 1.10.5
7077
- uses: actions/setup-python@v5
7178
with:
7279
python-version: "3.13"
80+
- uses: terraform-linters/setup-tflint@v4
81+
- run: yarn install --immutable --immutable-cache --check-cache
7382
- name: Install pre-commit
7483
run: pip install pre-commit
7584
- name: Run pre-commit

.pre-commit-config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ repos:
2525
- id: prettier
2626
name: Prettier
2727
entry: |
28-
yarn add --immutable --immutable-cache --check-cache
2928
yarn prettier --check --ignore-unknown '**/*'
3029
language: system
3130
pass_filenames: false
3231
stages: [manual]
3332
- id: rubocop
3433
name: Rubocop
35-
entry: bin/rubocop --autocorrect-all $*
34+
entry: bin/bundle exec rubocop --autocorrect-all $*
3635
language: system
3736
files: ^app/
3837
types: [ruby]

0 commit comments

Comments
 (0)