Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Enable erb_linting on the CI

Dombi Attila0a5332c77344
diff --git a/.erb-lint.yml b/.erb_lint.yml
similarity index 97%
rename from .erb-lint.yml
rename to .erb_lint.yml
index 7dc513d45ec..e812b208f7b 100644
--- a/.erb-lint.yml
+++ b/.erb_lint.yml
@@ -32,4 +32,4 @@ linters:
Lint/UselessAssignment:
Enabled: false
Rails/OutputSafety:
- Enabled: false
+ Enabled: true
diff --git a/.erb-linters/erblint-github.rb b/.erb_linters/erblint-github.rb
similarity index 100%
rename from .erb-linters/erblint-github.rb
rename to .erb_linters/erblint-github.rb
diff --git a/.github/workflows/rubocop-core.yml b/.github/workflows/rubocop-core.yml
index 32a1b04da2c..981a4782410 100644
--- a/.github/workflows/rubocop-core.yml
+++ b/.github/workflows/rubocop-core.yml
@@ -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/[email protected]
+ with:
+ github_token: ${{ secrets.github_token }}
+ reporter: github-pr-check
+ use_bundler: false
diff --git a/.rubocop.yml b/.rubocop.yml
index 4844bdfb944..367f25ae174 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -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:
diff --git a/lefthook.yml b/lefthook.yml
index ddcc48b4ee7..ce1717e53b6 100644
--- a/lefthook.yml
+++ b/lefthook.yml
@@ -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}"