Skip to content

Commit

Permalink
Pre-commit installation
Browse files Browse the repository at this point in the history
* Fix linting workflow to do necessary setups
* Ensure we run rubocop the right way
  • Loading branch information
TheOneFromNorway committed Mar 3, 2025
1 parent 7f7e3a3 commit af63eee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,21 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
cache: yarn
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.10.5
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- uses: terraform-linters/setup-tflint@v4
- run: yarn install --immutable --immutable-cache --check-cache
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
Expand Down
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ repos:
- id: prettier
name: Prettier
entry: |
yarn add --immutable --immutable-cache --check-cache
yarn prettier --check --ignore-unknown '**/*'
language: system
pass_filenames: false
stages: [manual]
- id: rubocop
name: Rubocop
entry: bin/rubocop --autocorrect-all $*
entry: bin/bundle exec rubocop --autocorrect-all $*
language: system
files: ^app/
types: [ruby]
Expand Down

0 comments on commit af63eee

Please sign in to comment.