GH-45398: [CI][Dev][Ruby] Add Ruby lint#45417
Conversation
|
|
|
This PR relates to Ruby. @kou Please check this too. |
| ( | ||
| ?^dev/tasks/homebrew-formulae/.*\.rb$| | ||
| ) | ||
| files: .*\.rb$ |
There was a problem hiding this comment.
Without this part and if the line width is 90, the pre-check claims the following
As we discussed on this #45403 (comment),
we need to exclude homebrew formulae. So, I added this part.
diff --git a/dev/tasks/homebrew-formulae/apache-arrow.rb b/dev/tasks/homebrew-formulae/apache-arrow.rb
index caf82b8db..01611d17b 100644
--- a/dev/tasks/homebrew-formulae/apache-arrow.rb
+++ b/dev/tasks/homebrew-formulae/apache-arrow.rb
@@ -110,7 +110,8 @@ class ApacheArrow < Formula
return 0;
}
EOS
- system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-L#{lib}", "-larrow", "-o", "test"
+ system ENV.cxx, "test.cpp", "-std=c++17", "-I#{include}", "-L#{lib}", "-larrow",
+ "-o", "test"
system "./test"
end
endThere was a problem hiding this comment.
dev/tasks/homebrew-formulae/*.rb should be excluded by exclude not files.
There was a problem hiding this comment.
I'm not familiar pre-commit configuration. I thought you commented exclude part. But you commented about the files part? If so, It seems OK to delete that part.
Do you mean this?
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 8dcbeaece..cc46728b0 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -152,7 +152,6 @@ repos:
(
?^dev/tasks/homebrew-formulae/.*\.rb$|
)
- files: .*\.rb$
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:There was a problem hiding this comment.
Removed files part. It seems to work well.
pre-commit run --verbose --all-files --color=always --show-diff-on-failure ruby-format
Ruby Format..............................................................Passed
- hook id: rubocop
- duration: 1.66s
Inspecting 84 files
....................................................................................
84 files inspected, no offenses detected
Inspecting 84 files
....................................................................................
84 files inspected, no offenses detected
Inspecting 84 files
....................................................................................
84 files inspected, no offenses detected
Inspecting 84 files
....................................................................................
84 files inspected, no offenses detected
Inspecting 84 files
....................................................................................
84 files inspected, no offenses detected
Inspecting 84 files
....................................................................................
84 files inspected, no offenses detected
Inspecting 84 files
....................................................................................
84 files inspected, no offenses detected
Inspecting 77 files
.............................................................................
77 files inspected, no offenses detected
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
|
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 6305c6e. There were 8 benchmark results with an error:
There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
Rationale for this change
Multiple users are developing Ruby codes. Adding Ruby Lint helps keep the same style.
What changes are included in this PR?
Add Ruby Lint. (Rubocop)
Are these changes tested?
Yes.
Are there any user-facing changes?
No.