Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Ruby 2.7.7 for tests and set --fix-all arg for Erblint by default #564

Merged
merged 4 commits into from
Jan 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 2.7.7
bundler: 2

- name: Set up bundle cache
Expand Down
4 changes: 2 additions & 2 deletions src/linters/erblint.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ class Erblint {
* @param {string} prefix - Prefix to the lint command
* @returns {{status: number, stdout: string, stderr: string}} - Output of the lint command
*/
static lint(dir, extensions, args = "--lint-all", fix = false, prefix = "") {
static lint(dir, extensions, args = "", fix = false, prefix = "") {
if (extensions.length !== 1 || extensions[0] !== "erb") {
throw new Error(`${this.name} error: File extensions are not configurable`);
}
if (fix) {
core.warning(`${this.name} does not support auto-fixing`);
}

return run(`${prefix} erblint --format json ${args}`, {
return run(`${prefix} erblint --format json --lint-all ${args}`, {
dir,
ignoreErrors: true,
});
Expand Down
36 changes: 18 additions & 18 deletions test/linters/projects/erblint/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
actionview (7.0.3)
activesupport (= 7.0.3)
actionview (7.0.4)
activesupport (= 7.0.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activesupport (7.0.3)
activesupport (7.0.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -24,37 +24,37 @@ GEM
builder (3.2.4)
concurrent-ruby (1.1.10)
crass (1.0.6)
erb_lint (0.1.1)
erb_lint (0.1.3)
activesupport
better_html (~> 1.0.7)
html_tokenizer
parser (>= 2.7.1.4)
rainbow
rubocop
smart_properties
erubi (1.10.0)
erubi (1.12.0)
html_tokenizer (0.0.7)
i18n (1.11.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
loofah (2.18.0)
loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mini_portile2 (2.8.0)
minitest (5.16.2)
nokogiri (1.13.6)
mini_portile2 (2.8.1)
minitest (5.17.0)
nokogiri (1.13.10)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
parallel (1.22.1)
parser (3.1.2.0)
parser (3.1.3.0)
ast (~> 2.4.1)
racc (1.6.0)
racc (1.6.2)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.3)
loofah (~> 2.3)
rails-html-sanitizer (1.4.4)
loofah (~> 2.19, >= 2.19.1)
rainbow (3.1.1)
regexp_parser (2.3.0)
regexp_parser (2.6.1)
rexml (3.2.5)
rubocop (1.12.1)
parallel (~> 1.10)
Expand All @@ -65,13 +65,13 @@ GEM
rubocop-ast (>= 1.2.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.17.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
ruby-progressbar (1.11.0)
smart_properties (1.17.0)
tzinfo (2.0.4)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unicode-display_width (2.1.0)
unicode-display_width (2.3.0)

PLATFORMS
ruby
Expand Down
6 changes: 3 additions & 3 deletions test/linters/projects/rubocop/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ GEM
specs:
ast (2.4.2)
parallel (1.22.1)
parser (3.1.2.0)
parser (3.1.3.0)
ast (~> 2.4.1)
rainbow (3.1.1)
regexp_parser (2.3.0)
regexp_parser (2.6.1)
rexml (3.2.5)
rubocop (0.93.1)
parallel (~> 1.10)
Expand All @@ -17,7 +17,7 @@ GEM
rubocop-ast (>= 0.6.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.17.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
ruby-progressbar (1.11.0)
unicode-display_width (1.8.0)
Expand Down