Skip to content

Commit 6305c6e

Browse files
hiroyuki-satokou
andauthored
GH-45398: [CI][Dev][Ruby] Add Ruby lint (#45417)
### 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. * GitHub Issue: #45398 Lead-authored-by: Hiroyuki Sato <[email protected]> Co-authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent ddc4bde commit 6305c6e

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

Diff for: .pre-commit-config.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,18 @@ repos:
141141
(
142142
?^r/src/arrowExports\.cpp$|
143143
)
144+
- repo: https://github.com/rubocop/rubocop
145+
rev: "v1.71.0"
146+
hooks:
147+
- id: rubocop
148+
name: Ruby Format
149+
alias: ruby-format
150+
args:
151+
- "--autocorrect"
152+
exclude: >-
153+
(
154+
?^dev/tasks/homebrew-formulae/.*\.rb$|
155+
)
144156
- repo: https://github.com/cheshirekow/cmake-format-precommit
145157
rev: v0.6.13
146158
hooks:

Diff for: .rubocop.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# Ruby lint begins minimal.
19+
# All of checkings changed to disable by default.
20+
AllCops:
21+
DisabledByDefault: true
22+
23+
Lint:
24+
Enabled: false
25+
26+
Layout/LineLength:
27+
Max: 100
28+
29+
Layout/ArgumentAlignment:
30+
Enabled: true

0 commit comments

Comments
 (0)