@@ -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,6 +128,10 @@ Rails/ApplicationController:
118
128
Exclude :
119
129
- app/public/controllers/shinycms/admin/tools/base_controller.rb
120
130
131
+ # Allow read access to ENV, for now (but better config handling is on the TODO list)
132
+ Rails/EnvironmentVariableAccess :
133
+ AllowReads : true
134
+
121
135
# Unused/demo controller in main_app, and 'no content' fallbacks in ShinyPages
122
136
Rails/RenderInline :
123
137
Exclude :
@@ -141,10 +155,6 @@ RSpec/BeforeAfterAll:
141
155
- spec/models/shinycms/theme_spec.rb
142
156
- spec/support/faker.rb
143
157
144
- # Currently inclined to keep this approach, for readability etc
145
- RSpec/DescribedClassModuleWrapping :
146
- Enabled : false
147
-
148
158
# This is ignoring config/initializers/inflections.rb (as about half of Rails does)
149
159
RSpec/FilePath :
150
160
Exclude :
@@ -153,6 +163,8 @@ RSpec/FilePath:
153
163
# Disabling these two for now (but open to discussion/persuasion on their merits)
154
164
RSpec/ExampleLength :
155
165
Enabled : false
166
+
167
+ # A test should test one thing; it may take more than one expectation to do so (thoroughly)
156
168
RSpec/MultipleExpectations :
157
169
Enabled : false
158
170
@@ -238,6 +250,6 @@ Style/MissingElse:
238
250
Style/Copyright :
239
251
Enabled : false
240
252
241
- # 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
242
254
Style/DocumentationMethod :
243
255
Enabled : false
0 commit comments