mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Enable erb_linting on the CI
This commit is contained in:
@@ -32,4 +32,4 @@ linters:
|
||||
Lint/UselessAssignment:
|
||||
Enabled: false
|
||||
Rails/OutputSafety:
|
||||
Enabled: false
|
||||
Enabled: true
|
||||
@@ -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
@@ -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:
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user