Enable erb_linting on the CI

This commit is contained in:
Dombi Attila
2025-01-31 12:42:09 +02:00
parent 3f54a8e5fd
commit 0a5332c773
5 changed files with 21 additions and 5 deletions
+1 -1
View File
@@ -32,4 +32,4 @@ linters:
Lint/UselessAssignment:
Enabled: false
Rails/OutputSafety:
Enabled: false
Enabled: true
+15 -3
View File
@@ -10,9 +10,12 @@ jobs:
name: rubocop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
- uses: reviewdog/action-rubocop@v2
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Run Rubocop
uses: reviewdog/action-rubocop@v2
with:
github_token: ${{ secrets.github_token }}
rubocop_version: gemfile
@@ -26,3 +29,12 @@ jobs:
rubocop-rspec_rails:gemfile
reporter: github-pr-check
only_changed: true
# This step can be removed once https://github.com/WizardComputer/action-erblint/pull/2 is merged
- name: Run bundle install
run: bundle install
- name: Run erb-lint
uses: WizardComputer/action-erblint@v1.0.0
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
use_bundler: false
+1 -1
View File
@@ -19,7 +19,7 @@ inherit_mode:
- Exclude
AllCops:
TargetRubyVersion: 3.3
TargetRubyVersion: 3.4
# Enable any new cops in new versions by default
NewCops: enable
Exclude:
+4
View File
@@ -17,6 +17,10 @@ pre-commit:
files: git diff --name-only --staged
glob: "*.rb"
run: bin/dirty-rubocop --uncommitted --force-exclusion {files}
erb_lint:
files: git diff --name-only --staged
glob: "*.erb"
run: erb_lint {files}
primer-view-components-version-is-the-same-everyhwere:
files: git diff --name-only --staged
glob: "{Gemfile.lock,frontend/package.json}"