pageflow-outline-navigation-bar 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.jshintrc +13 -0
- data/.rubocop.yml +24 -0
- data/.rubocop_hound.yml +1065 -0
- data/.scss-lint.yml +145 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +4 -0
- data/README.md +42 -0
- data/Rakefile +10 -0
- data/app/assets/images/pageflow/outline_navigation_bar/indicator.png +0 -0
- data/app/assets/images/pageflow/outline_navigation_bar/volume_control_sprite.png +0 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar.js +26 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/events.js +30 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/expander.js +34 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/fullscreen_button.js +24 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/hide_text_button.js +17 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/menu_item.js +41 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/navigator.js +35 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/panels.js +54 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/resizer.js +32 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/scroller.js +144 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/widget.js +227 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default.scss +87 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/credits_box.scss +28 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/cross_dependant_styles.css.scss +6 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/icons/icon_font.scss +177 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/icons/sprite.scss +140 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/menu_item.scss +107 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/menu_items.scss +33 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/mixins.scss +5 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/mobile_images.scss +54 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/mobile_panel.scss +61 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/mobile_sharing.scss +57 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/panel.scss +19 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/parent_page_button.scss +46 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/prevent_focus_rect_on_pointer_down.scss +4 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/scroller.scss +93 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/share_box.scss +20 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/toggle.scss +73 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/volume_box.scss +48 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/widget_margin.scss +27 -0
- data/app/views/pageflow/outline_navigation_bar/_widget.html.erb +12 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_buttons.html.erb +71 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_chapter.html.erb +5 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_home_button.html.erb +8 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_link.html.erb +3 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_mobile_panels.html.erb +28 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_overview_button.html.erb +8 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_scroller.html.erb +13 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_toggles.html.erb +32 -0
- data/config/locales/de.yml +8 -0
- data/config/locales/en.yml +8 -0
- data/lib/pageflow-outline-navigation-bar.rb +17 -0
- data/lib/pageflow/outline_navigation_bar/engine.rb +9 -0
- data/lib/pageflow/outline_navigation_bar/expandable_widget_type.rb +17 -0
- data/lib/pageflow/outline_navigation_bar/fixed_widget_type.rb +17 -0
- data/lib/pageflow/outline_navigation_bar/plugin.rb +12 -0
- data/lib/pageflow/outline_navigation_bar/version.rb +5 -0
- data/lib/pageflow/outline_navigation_bar/widget_type.rb +14 -0
- data/pageflow-outline-navigation-bar.gemspec +26 -0
- metadata +160 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 34971d1ce801fcf8566778955f172316df9899ae
|
4
|
+
data.tar.gz: d487ee87e01aab90e59fcac2eee601d975b1f2fc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cb9f11ec071a0057b904f7d0fb6f8da9cc856e15e57a441a65d27ff1ac72db4832bc7dfe0b8cc77b7cb821a511e6b3c80878923630b1a64ec4d70596b56c01c6
|
7
|
+
data.tar.gz: d635d5d16d04c42382b728ee2f5fa5ddb1115a3f6bd0d5cbf69bfaae76196bdbd8e9cdc6fe9c953b25b9764621fb8ca0f653227b9956f2a807229142fcfe26c0
|
data/.gitignore
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
*.sqlite3
|
4
|
+
.bundle
|
5
|
+
.config
|
6
|
+
.yardoc
|
7
|
+
.idea
|
8
|
+
InstalledFiles
|
9
|
+
_yardoc
|
10
|
+
coverage
|
11
|
+
doc/
|
12
|
+
lib/bundler/man
|
13
|
+
pkg
|
14
|
+
rdoc
|
15
|
+
spec/reports
|
16
|
+
test/tmp
|
17
|
+
test/version_tmp
|
18
|
+
tmp
|
19
|
+
log
|
20
|
+
Gemfile.lock
|
21
|
+
|
22
|
+
.localeapp
|
23
|
+
.localeapp
|
data/.jshintrc
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# Inherit from Hound default configuration so we can perform the same
|
2
|
+
# checks locally.
|
3
|
+
inherit_from: ./.rubocop_hound.yml
|
4
|
+
|
5
|
+
# Use double quotes only for interpolation.
|
6
|
+
Style/StringLiterals:
|
7
|
+
EnforcedStyle: single_quotes
|
8
|
+
|
9
|
+
# Place dots at the beginning of multiline method calls.
|
10
|
+
Style/DotPosition:
|
11
|
+
EnforcedStyle: leading
|
12
|
+
|
13
|
+
# The Rubocop version used by hound cannot yet detect RSpec expections
|
14
|
+
# that would change meaning with "do ... end".
|
15
|
+
Style/Blocks:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
# The default of 80 characters is a little to narrow.
|
19
|
+
Metrics/LineLength:
|
20
|
+
Max: 100
|
21
|
+
|
22
|
+
# Only place spaces inside blocks written with braces.
|
23
|
+
Style/SpaceInsideHashLiteralBraces:
|
24
|
+
EnforcedStyle: no_space
|
data/.rubocop_hound.yml
ADDED
@@ -0,0 +1,1065 @@
|
|
1
|
+
AllCops:
|
2
|
+
Include:
|
3
|
+
- "**/*.gemspec"
|
4
|
+
- "**/*.podspec"
|
5
|
+
- "**/*.jbuilder"
|
6
|
+
- "**/*.rake"
|
7
|
+
- "**/*.opal"
|
8
|
+
- "**/Gemfile"
|
9
|
+
- "**/Rakefile"
|
10
|
+
- "**/Capfile"
|
11
|
+
- "**/Guardfile"
|
12
|
+
- "**/Podfile"
|
13
|
+
- "**/Thorfile"
|
14
|
+
- "**/Vagrantfile"
|
15
|
+
- "**/Berksfile"
|
16
|
+
- "**/Cheffile"
|
17
|
+
- "**/Vagabondfile"
|
18
|
+
Exclude:
|
19
|
+
- "vendor/**/*"
|
20
|
+
- "db/schema.rb"
|
21
|
+
RunRailsCops: false
|
22
|
+
DisplayCopNames: false
|
23
|
+
StyleGuideCopsOnly: false
|
24
|
+
Style/AccessModifierIndentation:
|
25
|
+
Description: Check indentation of private/protected visibility modifiers.
|
26
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
|
27
|
+
Enabled: true
|
28
|
+
EnforcedStyle: indent
|
29
|
+
SupportedStyles:
|
30
|
+
- outdent
|
31
|
+
- indent
|
32
|
+
Style/AlignHash:
|
33
|
+
Description: Align the elements of a hash literal if they span more than one line.
|
34
|
+
Enabled: true
|
35
|
+
EnforcedHashRocketStyle: key
|
36
|
+
EnforcedColonStyle: key
|
37
|
+
EnforcedLastArgumentHashStyle: always_inspect
|
38
|
+
SupportedLastArgumentHashStyles:
|
39
|
+
- always_inspect
|
40
|
+
- always_ignore
|
41
|
+
- ignore_implicit
|
42
|
+
- ignore_explicit
|
43
|
+
Style/AlignParameters:
|
44
|
+
Description: Align the parameters of a method call if they span more than one line.
|
45
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
46
|
+
Enabled: true
|
47
|
+
EnforcedStyle: with_first_parameter
|
48
|
+
SupportedStyles:
|
49
|
+
- with_first_parameter
|
50
|
+
- with_fixed_indentation
|
51
|
+
Style/AndOr:
|
52
|
+
Description: Use &&/|| instead of and/or.
|
53
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
54
|
+
Enabled: true
|
55
|
+
EnforcedStyle: always
|
56
|
+
SupportedStyles:
|
57
|
+
- always
|
58
|
+
- conditionals
|
59
|
+
Style/BarePercentLiterals:
|
60
|
+
Description: Checks if usage of %() or %Q() matches configuration.
|
61
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
|
62
|
+
Enabled: true
|
63
|
+
EnforcedStyle: bare_percent
|
64
|
+
SupportedStyles:
|
65
|
+
- percent_q
|
66
|
+
- bare_percent
|
67
|
+
Style/BracesAroundHashParameters:
|
68
|
+
Description: Enforce braces style around hash parameters.
|
69
|
+
Enabled: true
|
70
|
+
EnforcedStyle: no_braces
|
71
|
+
SupportedStyles:
|
72
|
+
- braces
|
73
|
+
- no_braces
|
74
|
+
- context_dependent
|
75
|
+
Style/CaseIndentation:
|
76
|
+
Description: Indentation of when in a case/when/[else/]end.
|
77
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
78
|
+
Enabled: true
|
79
|
+
IndentWhenRelativeTo: case
|
80
|
+
SupportedStyles:
|
81
|
+
- case
|
82
|
+
- end
|
83
|
+
IndentOneStep: false
|
84
|
+
Style/ClassAndModuleChildren:
|
85
|
+
Description: Checks style of children classes and modules.
|
86
|
+
Enabled: false
|
87
|
+
EnforcedStyle: nested
|
88
|
+
SupportedStyles:
|
89
|
+
- nested
|
90
|
+
- compact
|
91
|
+
Style/ClassCheck:
|
92
|
+
Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
|
93
|
+
Enabled: true
|
94
|
+
EnforcedStyle: is_a?
|
95
|
+
SupportedStyles:
|
96
|
+
- is_a?
|
97
|
+
- kind_of?
|
98
|
+
Style/CollectionMethods:
|
99
|
+
Description: Preferred collection methods.
|
100
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
101
|
+
Enabled: true
|
102
|
+
PreferredMethods:
|
103
|
+
collect: map
|
104
|
+
collect!: map!
|
105
|
+
find: detect
|
106
|
+
find_all: select
|
107
|
+
reduce: inject
|
108
|
+
Style/CommentAnnotation:
|
109
|
+
Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
|
110
|
+
REVIEW).
|
111
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
|
112
|
+
Enabled: false
|
113
|
+
Keywords:
|
114
|
+
- TODO
|
115
|
+
- FIXME
|
116
|
+
- OPTIMIZE
|
117
|
+
- HACK
|
118
|
+
- REVIEW
|
119
|
+
Style/DotPosition:
|
120
|
+
Description: Checks the position of the dot in multi-line method calls.
|
121
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
122
|
+
Enabled: true
|
123
|
+
EnforcedStyle: trailing
|
124
|
+
SupportedStyles:
|
125
|
+
- leading
|
126
|
+
- trailing
|
127
|
+
Style/EmptyLineBetweenDefs:
|
128
|
+
Description: Use empty lines between defs.
|
129
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
130
|
+
Enabled: true
|
131
|
+
AllowAdjacentOneLineDefs: false
|
132
|
+
Style/EmptyLinesAroundBlockBody:
|
133
|
+
Description: Keeps track of empty lines around block bodies.
|
134
|
+
Enabled: true
|
135
|
+
EnforcedStyle: no_empty_lines
|
136
|
+
SupportedStyles:
|
137
|
+
- empty_lines
|
138
|
+
- no_empty_lines
|
139
|
+
Style/EmptyLinesAroundClassBody:
|
140
|
+
Description: Keeps track of empty lines around class bodies.
|
141
|
+
Enabled: true
|
142
|
+
EnforcedStyle: no_empty_lines
|
143
|
+
SupportedStyles:
|
144
|
+
- empty_lines
|
145
|
+
- no_empty_lines
|
146
|
+
Style/EmptyLinesAroundModuleBody:
|
147
|
+
Description: Keeps track of empty lines around module bodies.
|
148
|
+
Enabled: true
|
149
|
+
EnforcedStyle: no_empty_lines
|
150
|
+
SupportedStyles:
|
151
|
+
- empty_lines
|
152
|
+
- no_empty_lines
|
153
|
+
Style/Encoding:
|
154
|
+
Description: Use UTF-8 as the source file encoding.
|
155
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
|
156
|
+
Enabled: false
|
157
|
+
EnforcedStyle: always
|
158
|
+
SupportedStyles:
|
159
|
+
- when_needed
|
160
|
+
- always
|
161
|
+
Style/FileName:
|
162
|
+
Description: Use snake_case for source file names.
|
163
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
164
|
+
Enabled: false
|
165
|
+
Exclude: []
|
166
|
+
Style/FirstParameterIndentation:
|
167
|
+
Description: Checks the indentation of the first parameter in a method call.
|
168
|
+
Enabled: true
|
169
|
+
EnforcedStyle: special_for_inner_method_call_in_parentheses
|
170
|
+
SupportedStyles:
|
171
|
+
- consistent
|
172
|
+
- special_for_inner_method_call
|
173
|
+
- special_for_inner_method_call_in_parentheses
|
174
|
+
Style/For:
|
175
|
+
Description: Checks use of for or each in multiline loops.
|
176
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
|
177
|
+
Enabled: true
|
178
|
+
EnforcedStyle: each
|
179
|
+
SupportedStyles:
|
180
|
+
- for
|
181
|
+
- each
|
182
|
+
Style/FormatString:
|
183
|
+
Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
|
184
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
|
185
|
+
Enabled: false
|
186
|
+
EnforcedStyle: format
|
187
|
+
SupportedStyles:
|
188
|
+
- format
|
189
|
+
- sprintf
|
190
|
+
- percent
|
191
|
+
Style/GlobalVars:
|
192
|
+
Description: Do not introduce global variables.
|
193
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
|
194
|
+
Enabled: false
|
195
|
+
AllowedVariables: []
|
196
|
+
Style/GuardClause:
|
197
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
198
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
199
|
+
Enabled: false
|
200
|
+
MinBodyLength: 1
|
201
|
+
Style/HashSyntax:
|
202
|
+
Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
|
203
|
+
1, :b => 2 }.'
|
204
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
|
205
|
+
Enabled: true
|
206
|
+
EnforcedStyle: ruby19
|
207
|
+
SupportedStyles:
|
208
|
+
- ruby19
|
209
|
+
- hash_rockets
|
210
|
+
Style/IfUnlessModifier:
|
211
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
212
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
213
|
+
Enabled: false
|
214
|
+
MaxLineLength: 80
|
215
|
+
Style/IndentationWidth:
|
216
|
+
Description: Use 2 spaces for indentation.
|
217
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
218
|
+
Enabled: true
|
219
|
+
Width: 2
|
220
|
+
Style/IndentHash:
|
221
|
+
Description: Checks the indentation of the first key in a hash literal.
|
222
|
+
Enabled: true
|
223
|
+
EnforcedStyle: special_inside_parentheses
|
224
|
+
SupportedStyles:
|
225
|
+
- special_inside_parentheses
|
226
|
+
- consistent
|
227
|
+
Style/LambdaCall:
|
228
|
+
Description: Use lambda.call(...) instead of lambda.(...).
|
229
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
|
230
|
+
Enabled: false
|
231
|
+
EnforcedStyle: call
|
232
|
+
SupportedStyles:
|
233
|
+
- call
|
234
|
+
- braces
|
235
|
+
Style/Next:
|
236
|
+
Description: Use `next` to skip iteration instead of a condition at the end.
|
237
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
238
|
+
Enabled: false
|
239
|
+
EnforcedStyle: skip_modifier_ifs
|
240
|
+
MinBodyLength: 3
|
241
|
+
SupportedStyles:
|
242
|
+
- skip_modifier_ifs
|
243
|
+
- always
|
244
|
+
Style/NonNilCheck:
|
245
|
+
Description: Checks for redundant nil checks.
|
246
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
|
247
|
+
Enabled: true
|
248
|
+
IncludeSemanticChanges: false
|
249
|
+
Style/MethodDefParentheses:
|
250
|
+
Description: Checks if the method definitions have or don't have parentheses.
|
251
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
252
|
+
Enabled: true
|
253
|
+
EnforcedStyle: require_parentheses
|
254
|
+
SupportedStyles:
|
255
|
+
- require_parentheses
|
256
|
+
- require_no_parentheses
|
257
|
+
Style/MethodName:
|
258
|
+
Description: Use the configured style when naming methods.
|
259
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
260
|
+
Enabled: true
|
261
|
+
EnforcedStyle: snake_case
|
262
|
+
SupportedStyles:
|
263
|
+
- snake_case
|
264
|
+
- camelCase
|
265
|
+
Style/MultilineOperationIndentation:
|
266
|
+
Description: Checks indentation of binary operations that span more than one line.
|
267
|
+
Enabled: true
|
268
|
+
EnforcedStyle: aligned
|
269
|
+
SupportedStyles:
|
270
|
+
- aligned
|
271
|
+
- indented
|
272
|
+
Style/NumericLiterals:
|
273
|
+
Description: Add underscores to large numeric literals to improve their readability.
|
274
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
275
|
+
Enabled: false
|
276
|
+
MinDigits: 5
|
277
|
+
Style/ParenthesesAroundCondition:
|
278
|
+
Description: Don't use parentheses around the condition of an if/unless/while.
|
279
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
|
280
|
+
Enabled: true
|
281
|
+
AllowSafeAssignment: true
|
282
|
+
Style/PercentLiteralDelimiters:
|
283
|
+
Description: Use `%`-literal delimiters consistently
|
284
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
285
|
+
Enabled: false
|
286
|
+
PreferredDelimiters:
|
287
|
+
"%": "()"
|
288
|
+
"%i": "()"
|
289
|
+
"%q": "()"
|
290
|
+
"%Q": "()"
|
291
|
+
"%r": "{}"
|
292
|
+
"%s": "()"
|
293
|
+
"%w": "()"
|
294
|
+
"%W": "()"
|
295
|
+
"%x": "()"
|
296
|
+
Style/PercentQLiterals:
|
297
|
+
Description: Checks if uses of %Q/%q match the configured preference.
|
298
|
+
Enabled: true
|
299
|
+
EnforcedStyle: lower_case_q
|
300
|
+
SupportedStyles:
|
301
|
+
- lower_case_q
|
302
|
+
- upper_case_q
|
303
|
+
Style/PredicateName:
|
304
|
+
Description: Check the names of predicate methods.
|
305
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
306
|
+
Enabled: true
|
307
|
+
NamePrefix:
|
308
|
+
- is_
|
309
|
+
- has_
|
310
|
+
- have_
|
311
|
+
NamePrefixBlacklist:
|
312
|
+
- is_
|
313
|
+
Exclude:
|
314
|
+
- spec/**/*
|
315
|
+
Style/RaiseArgs:
|
316
|
+
Description: Checks the arguments passed to raise/fail.
|
317
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
318
|
+
Enabled: false
|
319
|
+
EnforcedStyle: exploded
|
320
|
+
SupportedStyles:
|
321
|
+
- compact
|
322
|
+
- exploded
|
323
|
+
Style/RedundantReturn:
|
324
|
+
Description: Don't use return where it's not required.
|
325
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
|
326
|
+
Enabled: true
|
327
|
+
AllowMultipleReturnValues: false
|
328
|
+
Style/RegexpLiteral:
|
329
|
+
Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
|
330
|
+
characters. Use %r only for regular expressions matching more than `MaxSlashes`
|
331
|
+
'/' character.
|
332
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
|
333
|
+
Enabled: false
|
334
|
+
MaxSlashes: 1
|
335
|
+
Style/Semicolon:
|
336
|
+
Description: Don't use semicolons to terminate expressions.
|
337
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
|
338
|
+
Enabled: true
|
339
|
+
AllowAsExpressionSeparator: false
|
340
|
+
Style/SignalException:
|
341
|
+
Description: Checks for proper usage of fail and raise.
|
342
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
343
|
+
Enabled: false
|
344
|
+
EnforcedStyle: semantic
|
345
|
+
SupportedStyles:
|
346
|
+
- only_raise
|
347
|
+
- only_fail
|
348
|
+
- semantic
|
349
|
+
Style/SingleLineBlockParams:
|
350
|
+
Description: Enforces the names of some block params.
|
351
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
|
352
|
+
Enabled: false
|
353
|
+
Methods:
|
354
|
+
- reduce:
|
355
|
+
- a
|
356
|
+
- e
|
357
|
+
- inject:
|
358
|
+
- a
|
359
|
+
- e
|
360
|
+
Style/SingleLineMethods:
|
361
|
+
Description: Avoid single-line methods.
|
362
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
363
|
+
Enabled: false
|
364
|
+
AllowIfMethodIsEmpty: true
|
365
|
+
Style/StringLiterals:
|
366
|
+
Description: Checks if uses of quotes match the configured preference.
|
367
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
368
|
+
Enabled: true
|
369
|
+
EnforcedStyle: double_quotes
|
370
|
+
SupportedStyles:
|
371
|
+
- single_quotes
|
372
|
+
- double_quotes
|
373
|
+
Style/StringLiteralsInInterpolation:
|
374
|
+
Description: Checks if uses of quotes inside expressions in interpolated strings
|
375
|
+
match the configured preference.
|
376
|
+
Enabled: true
|
377
|
+
EnforcedStyle: single_quotes
|
378
|
+
SupportedStyles:
|
379
|
+
- single_quotes
|
380
|
+
- double_quotes
|
381
|
+
Style/SpaceAroundBlockParameters:
|
382
|
+
Description: Checks the spacing inside and after block parameters pipes.
|
383
|
+
Enabled: true
|
384
|
+
EnforcedStyleInsidePipes: no_space
|
385
|
+
SupportedStyles:
|
386
|
+
- space
|
387
|
+
- no_space
|
388
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
389
|
+
Description: Checks that the equals signs in parameter default assignments have
|
390
|
+
or don't have surrounding space depending on configuration.
|
391
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
392
|
+
Enabled: true
|
393
|
+
EnforcedStyle: space
|
394
|
+
SupportedStyles:
|
395
|
+
- space
|
396
|
+
- no_space
|
397
|
+
Style/SpaceBeforeBlockBraces:
|
398
|
+
Description: Checks that the left block brace has or doesn't have space before it.
|
399
|
+
Enabled: true
|
400
|
+
EnforcedStyle: space
|
401
|
+
SupportedStyles:
|
402
|
+
- space
|
403
|
+
- no_space
|
404
|
+
Style/SpaceInsideBlockBraces:
|
405
|
+
Description: Checks that block braces have or don't have surrounding space. For
|
406
|
+
blocks taking parameters, checks that the left brace has or doesn't have trailing
|
407
|
+
space.
|
408
|
+
Enabled: true
|
409
|
+
EnforcedStyle: space
|
410
|
+
SupportedStyles:
|
411
|
+
- space
|
412
|
+
- no_space
|
413
|
+
EnforcedStyleForEmptyBraces: no_space
|
414
|
+
SpaceBeforeBlockParameters: true
|
415
|
+
Style/SpaceInsideHashLiteralBraces:
|
416
|
+
Description: Use spaces inside hash literal braces - or don't.
|
417
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
418
|
+
Enabled: true
|
419
|
+
EnforcedStyle: no_space
|
420
|
+
EnforcedStyleForEmptyBraces: no_space
|
421
|
+
SupportedStyles:
|
422
|
+
- space
|
423
|
+
- no_space
|
424
|
+
Style/SymbolProc:
|
425
|
+
Description: Use symbols as procs instead of blocks when possible.
|
426
|
+
Enabled: true
|
427
|
+
IgnoredMethods:
|
428
|
+
- respond_to
|
429
|
+
Style/TrailingBlankLines:
|
430
|
+
Description: Checks trailing blank lines and final newline.
|
431
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
432
|
+
Enabled: true
|
433
|
+
EnforcedStyle: final_newline
|
434
|
+
SupportedStyles:
|
435
|
+
- final_newline
|
436
|
+
- final_blank_line
|
437
|
+
Style/TrailingComma:
|
438
|
+
Description: Checks for trailing comma in parameter lists and literals.
|
439
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
440
|
+
Enabled: false
|
441
|
+
EnforcedStyleForMultiline: no_comma
|
442
|
+
SupportedStyles:
|
443
|
+
- comma
|
444
|
+
- no_comma
|
445
|
+
Style/TrivialAccessors:
|
446
|
+
Description: Prefer attr_* methods to trivial readers/writers.
|
447
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
|
448
|
+
Enabled: false
|
449
|
+
ExactNameMatch: false
|
450
|
+
AllowPredicates: false
|
451
|
+
AllowDSLWriters: false
|
452
|
+
Whitelist:
|
453
|
+
- to_ary
|
454
|
+
- to_a
|
455
|
+
- to_c
|
456
|
+
- to_enum
|
457
|
+
- to_h
|
458
|
+
- to_hash
|
459
|
+
- to_i
|
460
|
+
- to_int
|
461
|
+
- to_io
|
462
|
+
- to_open
|
463
|
+
- to_path
|
464
|
+
- to_proc
|
465
|
+
- to_r
|
466
|
+
- to_regexp
|
467
|
+
- to_str
|
468
|
+
- to_s
|
469
|
+
- to_sym
|
470
|
+
Style/VariableName:
|
471
|
+
Description: Use the configured style when naming variables.
|
472
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
473
|
+
Enabled: true
|
474
|
+
EnforcedStyle: snake_case
|
475
|
+
SupportedStyles:
|
476
|
+
- snake_case
|
477
|
+
- camelCase
|
478
|
+
Style/WhileUntilModifier:
|
479
|
+
Description: Favor modifier while/until usage when you have a single-line body.
|
480
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
|
481
|
+
Enabled: false
|
482
|
+
MaxLineLength: 80
|
483
|
+
Style/WordArray:
|
484
|
+
Description: Use %w or %W for arrays of words.
|
485
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
|
486
|
+
Enabled: false
|
487
|
+
MinSize: 0
|
488
|
+
WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
|
489
|
+
Metrics/AbcSize:
|
490
|
+
Description: A calculated magnitude based on number of assignments, branches, and
|
491
|
+
conditions.
|
492
|
+
Enabled: true
|
493
|
+
Max: 15
|
494
|
+
Metrics/BlockNesting:
|
495
|
+
Description: Avoid excessive block nesting
|
496
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
497
|
+
Enabled: false
|
498
|
+
Max: 3
|
499
|
+
Metrics/ClassLength:
|
500
|
+
Description: Avoid classes longer than 100 lines of code.
|
501
|
+
Enabled: false
|
502
|
+
CountComments: false
|
503
|
+
Max: 100
|
504
|
+
Metrics/CyclomaticComplexity:
|
505
|
+
Description: A complexity metric that is strongly correlated to the number of test
|
506
|
+
cases needed to validate a method.
|
507
|
+
Enabled: false
|
508
|
+
Max: 6
|
509
|
+
Metrics/LineLength:
|
510
|
+
Description: Limit lines to 80 characters.
|
511
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
|
512
|
+
Enabled: true
|
513
|
+
Max: 80
|
514
|
+
AllowURI: true
|
515
|
+
URISchemes:
|
516
|
+
- http
|
517
|
+
- https
|
518
|
+
Metrics/MethodLength:
|
519
|
+
Description: Avoid methods longer than 10 lines of code.
|
520
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
521
|
+
Enabled: false
|
522
|
+
CountComments: false
|
523
|
+
Max: 10
|
524
|
+
Metrics/ParameterLists:
|
525
|
+
Description: Avoid parameter lists longer than three or four parameters.
|
526
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
527
|
+
Enabled: false
|
528
|
+
Max: 5
|
529
|
+
CountKeywordArgs: true
|
530
|
+
Metrics/PerceivedComplexity:
|
531
|
+
Description: A complexity metric geared towards measuring complexity for a human
|
532
|
+
reader.
|
533
|
+
Enabled: false
|
534
|
+
Max: 7
|
535
|
+
Lint/AssignmentInCondition:
|
536
|
+
Description: Don't use assignment in conditions.
|
537
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
538
|
+
Enabled: false
|
539
|
+
AllowSafeAssignment: true
|
540
|
+
Lint/EndAlignment:
|
541
|
+
Description: Align ends correctly.
|
542
|
+
Enabled: true
|
543
|
+
AlignWith: keyword
|
544
|
+
SupportedStyles:
|
545
|
+
- keyword
|
546
|
+
- variable
|
547
|
+
Lint/DefEndAlignment:
|
548
|
+
Description: Align ends corresponding to defs correctly.
|
549
|
+
Enabled: true
|
550
|
+
AlignWith: start_of_line
|
551
|
+
SupportedStyles:
|
552
|
+
- start_of_line
|
553
|
+
- def
|
554
|
+
Rails/ActionFilter:
|
555
|
+
Description: Enforces consistent use of action filter methods.
|
556
|
+
Enabled: false
|
557
|
+
EnforcedStyle: action
|
558
|
+
SupportedStyles:
|
559
|
+
- action
|
560
|
+
- filter
|
561
|
+
Include:
|
562
|
+
- app/controllers/**/*.rb
|
563
|
+
Rails/DefaultScope:
|
564
|
+
Description: Checks if the argument passed to default_scope is a block.
|
565
|
+
Enabled: true
|
566
|
+
Include:
|
567
|
+
- app/models/**/*.rb
|
568
|
+
Rails/HasAndBelongsToMany:
|
569
|
+
Description: Prefer has_many :through to has_and_belongs_to_many.
|
570
|
+
Enabled: true
|
571
|
+
Include:
|
572
|
+
- app/models/**/*.rb
|
573
|
+
Rails/Output:
|
574
|
+
Description: Checks for calls to puts, print, etc.
|
575
|
+
Enabled: true
|
576
|
+
Include:
|
577
|
+
- app/**/*.rb
|
578
|
+
- config/**/*.rb
|
579
|
+
- db/**/*.rb
|
580
|
+
- lib/**/*.rb
|
581
|
+
Rails/ReadWriteAttribute:
|
582
|
+
Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
|
583
|
+
Enabled: true
|
584
|
+
Include:
|
585
|
+
- app/models/**/*.rb
|
586
|
+
Rails/ScopeArgs:
|
587
|
+
Description: Checks the arguments of ActiveRecord scopes.
|
588
|
+
Enabled: true
|
589
|
+
Include:
|
590
|
+
- app/models/**/*.rb
|
591
|
+
Rails/Validation:
|
592
|
+
Description: Use validates :attribute, hash of validations.
|
593
|
+
Enabled: true
|
594
|
+
Include:
|
595
|
+
- app/models/**/*.rb
|
596
|
+
Style/InlineComment:
|
597
|
+
Description: Avoid inline comments.
|
598
|
+
Enabled: false
|
599
|
+
Style/MethodCalledOnDoEndBlock:
|
600
|
+
Description: Avoid chaining a method call on a do...end block.
|
601
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
602
|
+
Enabled: false
|
603
|
+
Style/SymbolArray:
|
604
|
+
Description: Use %i or %I for arrays of symbols.
|
605
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
606
|
+
Enabled: false
|
607
|
+
Style/ExtraSpacing:
|
608
|
+
Description: Do not use unnecessary spacing.
|
609
|
+
Enabled: true
|
610
|
+
Style/AccessorMethodName:
|
611
|
+
Description: Check the naming of accessor methods for get_/set_.
|
612
|
+
Enabled: false
|
613
|
+
Style/Alias:
|
614
|
+
Description: Use alias_method instead of alias.
|
615
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
616
|
+
Enabled: false
|
617
|
+
Style/AlignArray:
|
618
|
+
Description: Align the elements of an array literal if they span more than one line.
|
619
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
620
|
+
Enabled: true
|
621
|
+
Style/ArrayJoin:
|
622
|
+
Description: Use Array#join instead of Array#*.
|
623
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
|
624
|
+
Enabled: false
|
625
|
+
Style/AsciiComments:
|
626
|
+
Description: Use only ascii symbols in comments.
|
627
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
|
628
|
+
Enabled: false
|
629
|
+
Style/AsciiIdentifiers:
|
630
|
+
Description: Use only ascii symbols in identifiers.
|
631
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
632
|
+
Enabled: false
|
633
|
+
Style/Attr:
|
634
|
+
Description: Checks for uses of Module#attr.
|
635
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
|
636
|
+
Enabled: false
|
637
|
+
Style/BeginBlock:
|
638
|
+
Description: Avoid the use of BEGIN blocks.
|
639
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
|
640
|
+
Enabled: true
|
641
|
+
Style/BlockComments:
|
642
|
+
Description: Do not use block comments.
|
643
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
644
|
+
Enabled: true
|
645
|
+
Style/BlockEndNewline:
|
646
|
+
Description: Put end statement of multiline block on its own line.
|
647
|
+
Enabled: true
|
648
|
+
Style/Blocks:
|
649
|
+
Description: Avoid using {...} for multi-line blocks (multiline chaining is always
|
650
|
+
ugly). Prefer {...} over do...end for single-line blocks.
|
651
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
652
|
+
Enabled: true
|
653
|
+
Style/CaseEquality:
|
654
|
+
Description: Avoid explicit use of the case equality operator(===).
|
655
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
|
656
|
+
Enabled: false
|
657
|
+
Style/CharacterLiteral:
|
658
|
+
Description: Checks for uses of character literals.
|
659
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
|
660
|
+
Enabled: false
|
661
|
+
Style/ClassAndModuleCamelCase:
|
662
|
+
Description: Use CamelCase for classes and modules.
|
663
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
|
664
|
+
Enabled: true
|
665
|
+
Style/ClassMethods:
|
666
|
+
Description: Use self when defining module/class methods.
|
667
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
|
668
|
+
Enabled: true
|
669
|
+
Style/ClassVars:
|
670
|
+
Description: Avoid the use of class variables.
|
671
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
672
|
+
Enabled: false
|
673
|
+
Style/ColonMethodCall:
|
674
|
+
Description: 'Do not use :: for method call.'
|
675
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
676
|
+
Enabled: false
|
677
|
+
Style/CommentIndentation:
|
678
|
+
Description: Indentation of comments.
|
679
|
+
Enabled: true
|
680
|
+
Style/ConstantName:
|
681
|
+
Description: Constants should use SCREAMING_SNAKE_CASE.
|
682
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
|
683
|
+
Enabled: true
|
684
|
+
Style/DefWithParentheses:
|
685
|
+
Description: Use def with parentheses when there are arguments.
|
686
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
687
|
+
Enabled: true
|
688
|
+
Style/DeprecatedHashMethods:
|
689
|
+
Description: Checks for use of deprecated Hash methods.
|
690
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
|
691
|
+
Enabled: false
|
692
|
+
Style/Documentation:
|
693
|
+
Description: Document classes and non-namespace modules.
|
694
|
+
Enabled: false
|
695
|
+
Style/DoubleNegation:
|
696
|
+
Description: Checks for uses of double negation (!!).
|
697
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
698
|
+
Enabled: false
|
699
|
+
Style/EachWithObject:
|
700
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
701
|
+
Enabled: false
|
702
|
+
Style/ElseAlignment:
|
703
|
+
Description: Align elses and elsifs correctly.
|
704
|
+
Enabled: true
|
705
|
+
Style/EmptyElse:
|
706
|
+
Description: Avoid empty else-clauses.
|
707
|
+
Enabled: true
|
708
|
+
Style/EmptyLines:
|
709
|
+
Description: Don't use several empty lines in a row.
|
710
|
+
Enabled: true
|
711
|
+
Style/EmptyLinesAroundAccessModifier:
|
712
|
+
Description: Keep blank lines around access modifiers.
|
713
|
+
Enabled: true
|
714
|
+
Style/EmptyLinesAroundMethodBody:
|
715
|
+
Description: Keeps track of empty lines around method bodies.
|
716
|
+
Enabled: true
|
717
|
+
Style/EmptyLiteral:
|
718
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
719
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
720
|
+
Enabled: false
|
721
|
+
Style/EndBlock:
|
722
|
+
Description: Avoid the use of END blocks.
|
723
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
|
724
|
+
Enabled: true
|
725
|
+
Style/EndOfLine:
|
726
|
+
Description: Use Unix-style line endings.
|
727
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
728
|
+
Enabled: true
|
729
|
+
Style/EvenOdd:
|
730
|
+
Description: Favor the use of Fixnum#even? && Fixnum#odd?
|
731
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
732
|
+
Enabled: false
|
733
|
+
Style/FlipFlop:
|
734
|
+
Description: Checks for flip flops
|
735
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
|
736
|
+
Enabled: false
|
737
|
+
Style/IfWithSemicolon:
|
738
|
+
Description: Do not use if x; .... Use the ternary operator instead.
|
739
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
740
|
+
Enabled: false
|
741
|
+
Style/IndentationConsistency:
|
742
|
+
Description: Keep indentation straight.
|
743
|
+
Enabled: true
|
744
|
+
Style/IndentArray:
|
745
|
+
Description: Checks the indentation of the first element in an array literal.
|
746
|
+
Enabled: true
|
747
|
+
Style/InfiniteLoop:
|
748
|
+
Description: Use Kernel#loop for infinite loops.
|
749
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
|
750
|
+
Enabled: true
|
751
|
+
Style/Lambda:
|
752
|
+
Description: Use the new lambda literal syntax for single-line blocks.
|
753
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
754
|
+
Enabled: false
|
755
|
+
Style/LeadingCommentSpace:
|
756
|
+
Description: Comments should start with a space.
|
757
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
758
|
+
Enabled: true
|
759
|
+
Style/LineEndConcatenation:
|
760
|
+
Description: Use \ instead of + or << to concatenate two string literals at line
|
761
|
+
end.
|
762
|
+
Enabled: false
|
763
|
+
Style/MethodCallParentheses:
|
764
|
+
Description: Do not use parentheses for method calls with no arguments.
|
765
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
|
766
|
+
Enabled: true
|
767
|
+
Style/ModuleFunction:
|
768
|
+
Description: Checks for usage of `extend self` in modules.
|
769
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
770
|
+
Enabled: false
|
771
|
+
Style/MultilineBlockChain:
|
772
|
+
Description: Avoid multi-line chains of blocks.
|
773
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
774
|
+
Enabled: true
|
775
|
+
Style/MultilineBlockLayout:
|
776
|
+
Description: Ensures newlines after multiline block do statements.
|
777
|
+
Enabled: true
|
778
|
+
Style/MultilineIfThen:
|
779
|
+
Description: Do not use then for multi-line if/unless.
|
780
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
|
781
|
+
Enabled: true
|
782
|
+
Style/MultilineTernaryOperator:
|
783
|
+
Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
|
784
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
|
785
|
+
Enabled: true
|
786
|
+
Style/NegatedIf:
|
787
|
+
Description: Favor unless over if for negative conditions (or control flow or).
|
788
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
|
789
|
+
Enabled: false
|
790
|
+
Style/NegatedWhile:
|
791
|
+
Description: Favor until over while for negative conditions.
|
792
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
793
|
+
Enabled: false
|
794
|
+
Style/NestedTernaryOperator:
|
795
|
+
Description: Use one expression per branch in a ternary operator.
|
796
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
|
797
|
+
Enabled: true
|
798
|
+
Style/NilComparison:
|
799
|
+
Description: Prefer x.nil? to x == nil.
|
800
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
801
|
+
Enabled: false
|
802
|
+
Style/Not:
|
803
|
+
Description: Use ! instead of not.
|
804
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
|
805
|
+
Enabled: false
|
806
|
+
Style/OneLineConditional:
|
807
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
808
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
809
|
+
Enabled: false
|
810
|
+
Style/OpMethod:
|
811
|
+
Description: When defining binary operators, name the argument other.
|
812
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
|
813
|
+
Enabled: false
|
814
|
+
Style/PerlBackrefs:
|
815
|
+
Description: Avoid Perl-style regex back references.
|
816
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
817
|
+
Enabled: false
|
818
|
+
Style/Proc:
|
819
|
+
Description: Use proc instead of Proc.new.
|
820
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
|
821
|
+
Enabled: false
|
822
|
+
Style/RedundantBegin:
|
823
|
+
Description: Don't use begin blocks when they are not needed.
|
824
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
|
825
|
+
Enabled: true
|
826
|
+
Style/RedundantException:
|
827
|
+
Description: Checks for an obsolete RuntimeException argument in raise/fail.
|
828
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
|
829
|
+
Enabled: true
|
830
|
+
Style/RedundantSelf:
|
831
|
+
Description: Don't use self where it's not needed.
|
832
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
|
833
|
+
Enabled: true
|
834
|
+
Style/RescueModifier:
|
835
|
+
Description: Avoid using rescue in its modifier form.
|
836
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
|
837
|
+
Enabled: true
|
838
|
+
Style/SelfAssignment:
|
839
|
+
Description: Checks for places where self-assignment shorthand should have been
|
840
|
+
used.
|
841
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
842
|
+
Enabled: false
|
843
|
+
Style/SingleSpaceBeforeFirstArg:
|
844
|
+
Description: Checks that exactly one space is used between a method name and the
|
845
|
+
first argument for method calls without parentheses.
|
846
|
+
Enabled: true
|
847
|
+
Style/SpaceAfterColon:
|
848
|
+
Description: Use spaces after colons.
|
849
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
850
|
+
Enabled: true
|
851
|
+
Style/SpaceAfterComma:
|
852
|
+
Description: Use spaces after commas.
|
853
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
854
|
+
Enabled: true
|
855
|
+
Style/SpaceAfterControlKeyword:
|
856
|
+
Description: Use spaces after if/elsif/unless/while/until/case/when.
|
857
|
+
Enabled: true
|
858
|
+
Style/SpaceAfterMethodName:
|
859
|
+
Description: Do not put a space between a method name and the opening parenthesis
|
860
|
+
in a method definition.
|
861
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
862
|
+
Enabled: true
|
863
|
+
Style/SpaceAfterNot:
|
864
|
+
Description: Tracks redundant space after the ! operator.
|
865
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
866
|
+
Enabled: true
|
867
|
+
Style/SpaceAfterSemicolon:
|
868
|
+
Description: Use spaces after semicolons.
|
869
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
870
|
+
Enabled: true
|
871
|
+
Style/SpaceBeforeComma:
|
872
|
+
Description: No spaces before commas.
|
873
|
+
Enabled: true
|
874
|
+
Style/SpaceBeforeComment:
|
875
|
+
Description: Checks for missing space between code and a comment on the same line.
|
876
|
+
Enabled: true
|
877
|
+
Style/SpaceBeforeSemicolon:
|
878
|
+
Description: No spaces before semicolons.
|
879
|
+
Enabled: true
|
880
|
+
Style/SpaceAroundOperators:
|
881
|
+
Description: Use spaces around operators.
|
882
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
883
|
+
Enabled: true
|
884
|
+
Style/SpaceBeforeModifierKeyword:
|
885
|
+
Description: Put a space before the modifier keyword.
|
886
|
+
Enabled: true
|
887
|
+
Style/SpaceInsideBrackets:
|
888
|
+
Description: No spaces after [ or before ].
|
889
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
890
|
+
Enabled: true
|
891
|
+
Style/SpaceInsideParens:
|
892
|
+
Description: No spaces after ( or before ).
|
893
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
894
|
+
Enabled: true
|
895
|
+
Style/SpaceInsideRangeLiteral:
|
896
|
+
Description: No spaces inside range literals.
|
897
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
898
|
+
Enabled: true
|
899
|
+
Style/SpecialGlobalVars:
|
900
|
+
Description: Avoid Perl-style global variables.
|
901
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
902
|
+
Enabled: false
|
903
|
+
Style/StructInheritance:
|
904
|
+
Description: Checks for inheritance from Struct.new.
|
905
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
|
906
|
+
Enabled: true
|
907
|
+
Style/Tab:
|
908
|
+
Description: No hard tabs.
|
909
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
910
|
+
Enabled: true
|
911
|
+
Style/TrailingWhitespace:
|
912
|
+
Description: Avoid trailing whitespace.
|
913
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
914
|
+
Enabled: true
|
915
|
+
Style/UnlessElse:
|
916
|
+
Description: Do not use unless with else. Rewrite these with the positive case first.
|
917
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
|
918
|
+
Enabled: true
|
919
|
+
Style/UnneededCapitalW:
|
920
|
+
Description: Checks for %W when interpolation is not needed.
|
921
|
+
Enabled: true
|
922
|
+
Style/UnneededPercentQ:
|
923
|
+
Description: Checks for %q/%Q when single quotes or double quotes would do.
|
924
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
|
925
|
+
Enabled: true
|
926
|
+
Style/UnneededPercentX:
|
927
|
+
Description: Checks for %x when `` would do.
|
928
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
|
929
|
+
Enabled: true
|
930
|
+
Style/VariableInterpolation:
|
931
|
+
Description: Don't interpolate global, instance and class variables directly in
|
932
|
+
strings.
|
933
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
934
|
+
Enabled: false
|
935
|
+
Style/WhenThen:
|
936
|
+
Description: Use when x then ... for one-line cases.
|
937
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
938
|
+
Enabled: false
|
939
|
+
Style/WhileUntilDo:
|
940
|
+
Description: Checks for redundant do after while or until.
|
941
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
|
942
|
+
Enabled: true
|
943
|
+
Lint/AmbiguousOperator:
|
944
|
+
Description: Checks for ambiguous operators in the first argument of a method invocation
|
945
|
+
without parentheses.
|
946
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
|
947
|
+
Enabled: false
|
948
|
+
Lint/AmbiguousRegexpLiteral:
|
949
|
+
Description: Checks for ambiguous regexp literals in the first argument of a method
|
950
|
+
invocation without parenthesis.
|
951
|
+
Enabled: false
|
952
|
+
Lint/BlockAlignment:
|
953
|
+
Description: Align block ends correctly.
|
954
|
+
Enabled: true
|
955
|
+
Lint/ConditionPosition:
|
956
|
+
Description: Checks for condition placed in a confusing position relative to the
|
957
|
+
keyword.
|
958
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
|
959
|
+
Enabled: false
|
960
|
+
Lint/Debugger:
|
961
|
+
Description: Check for debugger calls.
|
962
|
+
Enabled: true
|
963
|
+
Lint/DeprecatedClassMethods:
|
964
|
+
Description: Check for deprecated class method calls.
|
965
|
+
Enabled: false
|
966
|
+
Lint/DuplicateMethods:
|
967
|
+
Description: Check for duplicate methods calls.
|
968
|
+
Enabled: true
|
969
|
+
Lint/ElseLayout:
|
970
|
+
Description: Check for odd code arrangement in an else block.
|
971
|
+
Enabled: false
|
972
|
+
Lint/EmptyEnsure:
|
973
|
+
Description: Checks for empty ensure block.
|
974
|
+
Enabled: true
|
975
|
+
Lint/EmptyInterpolation:
|
976
|
+
Description: Checks for empty string interpolation.
|
977
|
+
Enabled: true
|
978
|
+
Lint/EndInMethod:
|
979
|
+
Description: END blocks should not be placed inside method definitions.
|
980
|
+
Enabled: true
|
981
|
+
Lint/EnsureReturn:
|
982
|
+
Description: Do not use return in an ensure block.
|
983
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
984
|
+
Enabled: true
|
985
|
+
Lint/Eval:
|
986
|
+
Description: The use of eval represents a serious security risk.
|
987
|
+
Enabled: true
|
988
|
+
Lint/HandleExceptions:
|
989
|
+
Description: Don't suppress exception.
|
990
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
991
|
+
Enabled: false
|
992
|
+
Lint/InvalidCharacterLiteral:
|
993
|
+
Description: Checks for invalid character literals with a non-escaped whitespace
|
994
|
+
character.
|
995
|
+
Enabled: false
|
996
|
+
Lint/LiteralInCondition:
|
997
|
+
Description: Checks of literals used in conditions.
|
998
|
+
Enabled: false
|
999
|
+
Lint/LiteralInInterpolation:
|
1000
|
+
Description: Checks for literals used in interpolation.
|
1001
|
+
Enabled: false
|
1002
|
+
Lint/Loop:
|
1003
|
+
Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
|
1004
|
+
for post-loop tests.
|
1005
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
|
1006
|
+
Enabled: false
|
1007
|
+
Lint/ParenthesesAsGroupedExpression:
|
1008
|
+
Description: Checks for method calls with a space before the opening parenthesis.
|
1009
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
1010
|
+
Enabled: false
|
1011
|
+
Lint/RequireParentheses:
|
1012
|
+
Description: Use parentheses in the method call to avoid confusion about precedence.
|
1013
|
+
Enabled: false
|
1014
|
+
Lint/RescueException:
|
1015
|
+
Description: Avoid rescuing the Exception class.
|
1016
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
|
1017
|
+
Enabled: true
|
1018
|
+
Lint/ShadowingOuterLocalVariable:
|
1019
|
+
Description: Do not use the same name as outer local variable for block arguments
|
1020
|
+
or block local variables.
|
1021
|
+
Enabled: true
|
1022
|
+
Lint/SpaceBeforeFirstArg:
|
1023
|
+
Description: Put a space between a method name and the first argument in a method
|
1024
|
+
call without parentheses.
|
1025
|
+
Enabled: true
|
1026
|
+
Lint/StringConversionInInterpolation:
|
1027
|
+
Description: Checks for Object#to_s usage in string interpolation.
|
1028
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
|
1029
|
+
Enabled: true
|
1030
|
+
Lint/UnderscorePrefixedVariableName:
|
1031
|
+
Description: Do not use prefix `_` for a variable that is used.
|
1032
|
+
Enabled: false
|
1033
|
+
Lint/UnusedBlockArgument:
|
1034
|
+
Description: Checks for unused block arguments.
|
1035
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1036
|
+
Enabled: true
|
1037
|
+
Lint/UnusedMethodArgument:
|
1038
|
+
Description: Checks for unused method arguments.
|
1039
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1040
|
+
Enabled: true
|
1041
|
+
Lint/UnreachableCode:
|
1042
|
+
Description: Unreachable code.
|
1043
|
+
Enabled: true
|
1044
|
+
Lint/UselessAccessModifier:
|
1045
|
+
Description: Checks for useless access modifiers.
|
1046
|
+
Enabled: true
|
1047
|
+
Lint/UselessAssignment:
|
1048
|
+
Description: Checks for useless assignment to a local variable.
|
1049
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1050
|
+
Enabled: true
|
1051
|
+
Lint/UselessComparison:
|
1052
|
+
Description: Checks for comparison of something with itself.
|
1053
|
+
Enabled: true
|
1054
|
+
Lint/UselessElseWithoutRescue:
|
1055
|
+
Description: Checks for useless `else` in `begin..end` without `rescue`.
|
1056
|
+
Enabled: true
|
1057
|
+
Lint/UselessSetterCall:
|
1058
|
+
Description: Checks for useless setter call to a local variable.
|
1059
|
+
Enabled: true
|
1060
|
+
Lint/Void:
|
1061
|
+
Description: Possible use of operator/literal/variable in void context.
|
1062
|
+
Enabled: false
|
1063
|
+
Rails/Delegate:
|
1064
|
+
Description: Prefer delegate method for delegations.
|
1065
|
+
Enabled: false
|