Skip to content

Commit 91bc86e

Browse files
Install rubocop and copy config from activeadmin
1 parent 119d9fc commit 91bc86e

File tree

4 files changed

+126
-0
lines changed

4 files changed

+126
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ spec/reports
2121
/test_app/.sass-cache
2222
/test_app/config/mongoid.yml
2323
/spec/rails
24+
.ruby-version

.rubocop.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
AllCops:
2+
DisabledByDefault: true
3+
TargetRubyVersion: 2.4
4+
5+
DisplayCopNames: true
6+
7+
StyleGuideCopsOnly: false
8+
9+
Layout/EndAlignment:
10+
Enabled: true
11+
12+
Lint/ParenthesesAsGroupedExpression:
13+
Enabled: true
14+
15+
Layout/AccessModifierIndentation:
16+
Enabled: true
17+
18+
Layout/CaseIndentation:
19+
Enabled: true
20+
21+
Layout/CommentIndentation:
22+
Enabled: true
23+
24+
Layout/ElseAlignment:
25+
Enabled: true
26+
27+
Layout/EmptyLines:
28+
Enabled: true
29+
30+
Layout/EmptyLinesAroundBlockBody:
31+
Enabled: true
32+
33+
Layout/EndOfLine:
34+
Enabled: true
35+
36+
Layout/ExtraSpacing:
37+
Enabled: true
38+
39+
Style/Dir:
40+
Enabled: true
41+
42+
Style/Encoding:
43+
Enabled: true
44+
45+
Style/ExpandPathArguments:
46+
Enabled: true
47+
48+
Style/FrozenStringLiteralComment:
49+
Enabled: true
50+
EnforcedStyle: never
51+
52+
Style/HashSyntax:
53+
Enabled: true
54+
55+
Style/ParallelAssignment:
56+
Enabled: true
57+
58+
Layout/IndentationConsistency:
59+
Enabled: true
60+
61+
Layout/IndentationWidth:
62+
Enabled: true
63+
64+
Naming/PredicateName:
65+
Enabled: true
66+
67+
ForbiddenPrefixes:
68+
- is_
69+
- have_
70+
71+
AllowedMethods:
72+
- has_many
73+
- has_many_actions
74+
75+
Style/TrailingCommaInArguments:
76+
Enabled: true
77+
78+
Layout/TrailingEmptyLines:
79+
Enabled: true
80+
81+
Layout/TrailingWhitespace:
82+
Enabled: true
83+
84+
Layout/SpaceAfterComma:
85+
Enabled: true
86+
87+
Layout/SpaceAroundEqualsInParameterDefault:
88+
Enabled: true
89+
90+
Layout/SpaceAroundOperators:
91+
Enabled: true
92+
93+
Layout/SpaceBeforeBlockBraces:
94+
Enabled: true
95+
96+
Layout/SpaceInsideBlockBraces:
97+
Enabled: true
98+
99+
Layout/SpaceInsideHashLiteralBraces:
100+
Enabled: true
101+
102+
Layout/SpaceInsideParens:
103+
Enabled: true

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ group :test do
2020
gem 'launchy'
2121
gem 'simplecov', require: false
2222
end
23+
24+
group :lint do
25+
gem 'rubocop', '0.80.0'
26+
end

Gemfile.lock

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ GEM
7474
arbre (1.2.1)
7575
activesupport (>= 3.0.0)
7676
arel (9.0.0)
77+
ast (2.4.0)
7778
bcrypt (3.1.13)
7879
bson (4.7.1)
7980
builder (3.2.3)
@@ -114,6 +115,7 @@ GEM
114115
has_scope (~> 0.6)
115116
railties (>= 5.0, < 6.1)
116117
responders (>= 2, < 4)
118+
jaro_winkler (1.5.4)
117119
jquery-rails (4.3.3)
118120
rails-dom-testing (>= 1, < 3)
119121
railties (>= 4.2.0)
@@ -161,6 +163,9 @@ GEM
161163
nokogiri (1.10.5)
162164
mini_portile2 (~> 2.4.0)
163165
orm_adapter (0.5.0)
166+
parallel (1.19.1)
167+
parser (2.7.0.2)
168+
ast (~> 2.4.0)
164169
poltergeist (1.18.1)
165170
capybara (>= 2.1, < 4)
166171
cliver (~> 0.3.1)
@@ -200,6 +205,7 @@ GEM
200205
method_source
201206
rake (>= 0.8.7)
202207
thor (>= 0.19.0, < 2.0)
208+
rainbow (3.0.0)
203209
rake (12.3.3)
204210
ransack (2.3.2)
205211
activerecord (>= 5.2.1)
@@ -210,6 +216,7 @@ GEM
210216
responders (2.4.1)
211217
actionpack (>= 4.2.0, < 6.0)
212218
railties (>= 4.2.0, < 6.0)
219+
rexml (3.2.4)
213220
rspec-core (3.8.0)
214221
rspec-support (~> 3.8.0)
215222
rspec-expectations (3.8.2)
@@ -227,6 +234,15 @@ GEM
227234
rspec-mocks (~> 3.8.0)
228235
rspec-support (~> 3.8.0)
229236
rspec-support (3.8.0)
237+
rubocop (0.80.0)
238+
jaro_winkler (~> 1.5.1)
239+
parallel (~> 1.10)
240+
parser (>= 2.7.0.1)
241+
rainbow (>= 2.2.2, < 4.0)
242+
rexml
243+
ruby-progressbar (~> 1.7)
244+
unicode-display_width (>= 1.4.0, < 1.7)
245+
ruby-progressbar (1.10.1)
230246
sass-rails (6.0.0)
231247
sassc-rails (~> 2.1, >= 2.1.1)
232248
sassc (2.2.1)
@@ -254,6 +270,7 @@ GEM
254270
tilt (2.0.10)
255271
tzinfo (1.2.5)
256272
thread_safe (~> 0.1)
273+
unicode-display_width (1.6.1)
257274
warden (1.2.8)
258275
rack (>= 2.0.6)
259276
websocket-driver (0.7.0)
@@ -278,6 +295,7 @@ DEPENDENCIES
278295
rails (>= 5.2, < 6.1)
279296
ransack-mongoid!
280297
rspec-rails (~> 3.6)
298+
rubocop (= 0.80.0)
281299
simplecov
282300

283301
BUNDLED WITH

0 commit comments

Comments
 (0)