@@ -17,25 +17,31 @@ AllCops:
17
17
NewCops : enable
18
18
Exclude :
19
19
# Not Ruby files (skipping these makes Rubocop run faster)
20
- - ../../app/assets/**/* # main_app
21
- - ../*/app/assets/**/* # plugins
20
+ # # Main app
22
21
- ../../bin/*
23
22
- ../../coverage/**/*
24
23
- ../../docs/**/*
25
24
- ../../log/*
26
25
- ../../node_modules/**/*
27
26
- ../../public/**/*
28
- - ../../themes/**/*
29
27
- ../../tmp/**/*
30
28
- ../../tools/*
29
+ # # Plugins and Themes
30
+ - ../*/app/assets/**/*
31
+ - ../*/bin/*
32
+ - ../*/vendor/**/*
33
+ - ../../themes/**/*
31
34
# Code autogenerated by ActiveRecord spectacularly fails RuboCop
32
- - ../../db/schema.rb
33
- - ../../db/archived-migrations/*
34
- - ../../db/migrate/* # main_app
35
- - ../*/db/migrate/*.rb # plugins
35
+ - ../../db/**/* # main_app
36
+ - ../*/db/migrate/* # plugins
36
37
# RuboCop also hates this autogenerated data file
37
38
- db/demo_site_data.rb
38
39
40
+ # Turning this off for now; ideally this Gemfile would be mostly empty anyway
41
+ Bundler/GemVersion :
42
+ Exclude :
43
+ - ../../Gemfile
44
+
39
45
# These are mostly expected to contain long blocks due to their DSLs
40
46
Metrics/BlockLength :
41
47
Exclude :
@@ -50,14 +56,18 @@ Metrics/BlockLength:
50
56
# Spec files with I18n.t calls have long lines. I can live with that.
51
57
Layout/LineLength :
52
58
Exclude :
53
- - ../../spec/**/*.rb # main_app
54
- - ../*/spec/**/*.rb # plugins
59
+ - ../*/spec/**/*.rb
55
60
56
61
# This config file is easier to understand laid out as it is, not as this cop wants it
57
62
Layout/MultilineArrayLineBreaks :
58
63
Exclude :
59
64
- config/initializers/html_sanitizer.rb
60
65
66
+ # This looks really inconsistent next to `expect().to`
67
+ Layout/SingleLineBlockChain :
68
+ Exclude :
69
+ - ../*/spec/**/*
70
+
61
71
# This method is not useless - it allows user registrations to be feature-flagged
62
72
Lint/UselessMethodDefinition :
63
73
Exclude :
@@ -118,7 +128,7 @@ Rails/ApplicationController:
118
128
Exclude :
119
129
- app/public/controllers/shinycms/admin/tools/base_controller.rb
120
130
121
- # Allow read access to ENV
131
+ # Allow read access to ENV, for now (but better config handling is on the TODO list)
122
132
Rails/EnvironmentVariableAccess :
123
133
AllowReads : true
124
134
@@ -145,10 +155,6 @@ RSpec/BeforeAfterAll:
145
155
- spec/models/shinycms/theme_spec.rb
146
156
- spec/support/faker.rb
147
157
148
- # Currently inclined to keep this approach, for readability etc
149
- RSpec/DescribedClassModuleWrapping :
150
- Enabled : false
151
-
152
158
# This is ignoring config/initializers/inflections.rb (as about half of Rails does)
153
159
RSpec/FilePath :
154
160
Exclude :
@@ -157,6 +163,8 @@ RSpec/FilePath:
157
163
# Disabling these two for now (but open to discussion/persuasion on their merits)
158
164
RSpec/ExampleLength :
159
165
Enabled : false
166
+
167
+ # A test should test one thing; it may take more than one expectation to do so (thoroughly)
160
168
RSpec/MultipleExpectations :
161
169
Enabled : false
162
170
@@ -242,6 +250,6 @@ Style/MissingElse:
242
250
Style/Copyright :
243
251
Enabled : false
244
252
245
- # Not every method needs a comment explaining what it does
253
+ # Most methods already have names that explain what they do, they don't need a comment as well
246
254
Style/DocumentationMethod :
247
255
Enabled : false
0 commit comments