gist_updater 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +8 -1280
- data/.travis.yml +8 -0
- data/Gemfile +0 -3
- data/README.md +4 -4
- data/gist_updater.gemspec +10 -10
- data/lib/gist_updater/config.rb +1 -1
- data/lib/gist_updater/version.rb +1 -1
- metadata +18 -21
- data/.ruby-version +0 -1
- data/circle.yml +0 -8
- data/disabled.yml +0 -108
- data/enabled.yml +0 -1506
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# GistUpdater
|
2
2
|
|
3
|
-
[![
|
4
|
-
[![License](https://img.shields.io/github/license/masutaka/gist_updater.svg?
|
5
|
-
[![Gem](https://img.shields.io/gem/v/gist_updater.svg?
|
3
|
+
[![Travis Status](https://img.shields.io/travis/masutaka/gist_updater.svg?style=flat-square)][travisci]
|
4
|
+
[![License](https://img.shields.io/github/license/masutaka/gist_updater.svg?style=flat-square)][license]
|
5
|
+
[![Gem](https://img.shields.io/gem/v/gist_updater.svg?style=flat-square)][gem-link]
|
6
6
|
|
7
|
-
[
|
7
|
+
[travisci]: https://travis-ci.org/masutaka/gist_updater
|
8
8
|
[license]: https://github.com/masutaka/gist_updater/blob/master/LICENSE.txt
|
9
9
|
[gem-link]: http://badge.fury.io/rb/gist_updater
|
10
10
|
|
data/gist_updater.gemspec
CHANGED
@@ -11,10 +11,10 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.email = ['masutaka.net@gmail.com']
|
12
12
|
|
13
13
|
spec.summary = 'Updates your Gist files defined in YAML'
|
14
|
-
spec.description =
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
spec.description = <<-DESCRIPTION.gsub(/^\s+/, '')
|
15
|
+
Updates your Gist files defined in YAML.
|
16
|
+
For example, it's useful for syncing GitHub and Gist in CI.
|
17
|
+
DESCRIPTION
|
18
18
|
spec.homepage = 'https://github.com/masutaka/gist_updater'
|
19
19
|
spec.license = 'MIT'
|
20
20
|
|
@@ -28,10 +28,10 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_dependency 'octokit', '~> 4.0'
|
29
29
|
spec.add_dependency 'thor', '~> 0.19.1'
|
30
30
|
|
31
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
32
|
-
spec.add_development_dependency 'rake', '~>
|
33
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
34
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
35
|
-
spec.add_development_dependency '
|
36
|
-
spec.add_development_dependency '
|
31
|
+
spec.add_development_dependency 'bundler', '~> 1.x'
|
32
|
+
spec.add_development_dependency 'rake', '~> 12.x'
|
33
|
+
spec.add_development_dependency 'rspec', '~> 3.x'
|
34
|
+
spec.add_development_dependency 'rubocop', '~> 0.52.x'
|
35
|
+
spec.add_development_dependency 'webmock', '~> 3.x'
|
36
|
+
spec.add_development_dependency 'yard', '~> 0.x'
|
37
37
|
end
|
data/lib/gist_updater/config.rb
CHANGED
data/lib/gist_updater/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gist_updater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Masuda
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -44,84 +44,84 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.x
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.x
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 12.x
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 12.x
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 3.x
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 3.x
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rubocop
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.52.x
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 0.52.x
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: webmock
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 3.x
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 3.x
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: yard
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: 0.x
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: 0.x
|
125
125
|
description: |
|
126
126
|
Updates your Gist files defined in YAML.
|
127
127
|
For example, it's useful for syncing GitHub and Gist in CI.
|
@@ -135,7 +135,7 @@ files:
|
|
135
135
|
- ".gitignore"
|
136
136
|
- ".rspec"
|
137
137
|
- ".rubocop.yml"
|
138
|
-
- ".
|
138
|
+
- ".travis.yml"
|
139
139
|
- CODE_OF_CONDUCT.md
|
140
140
|
- Gemfile
|
141
141
|
- LICENSE.txt
|
@@ -143,9 +143,6 @@ files:
|
|
143
143
|
- Rakefile
|
144
144
|
- bin/console
|
145
145
|
- bin/setup
|
146
|
-
- circle.yml
|
147
|
-
- disabled.yml
|
148
|
-
- enabled.yml
|
149
146
|
- exe/gist_updater
|
150
147
|
- gist_updater.gemspec
|
151
148
|
- gist_updater.yml.example
|
@@ -176,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
173
|
version: '0'
|
177
174
|
requirements: []
|
178
175
|
rubyforge_project:
|
179
|
-
rubygems_version: 2.
|
176
|
+
rubygems_version: 2.7.3
|
180
177
|
signing_key:
|
181
178
|
specification_version: 4
|
182
179
|
summary: Updates your Gist files defined in YAML
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.3.1
|
data/circle.yml
DELETED
data/disabled.yml
DELETED
@@ -1,108 +0,0 @@
|
|
1
|
-
# These are all the cops that are disabled in the default configuration.
|
2
|
-
|
3
|
-
# By default, the rails cops are not run. Override in project or home
|
4
|
-
# directory .rubocop.yml files, or by giving the -R/--rails option.
|
5
|
-
Rails:
|
6
|
-
Enabled: false
|
7
|
-
|
8
|
-
Rails/SaveBang:
|
9
|
-
Description: 'Identifies possible cases where Active Record save! or related should be used.'
|
10
|
-
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#save-bang'
|
11
|
-
Enabled: false
|
12
|
-
|
13
|
-
Style/AutoResourceCleanup:
|
14
|
-
Description: 'Suggests the usage of an auto resource cleanup version of a method (if available).'
|
15
|
-
Enabled: false
|
16
|
-
|
17
|
-
Style/CollectionMethods:
|
18
|
-
Description: 'Preferred collection methods.'
|
19
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size'
|
20
|
-
Enabled: false
|
21
|
-
|
22
|
-
Style/Copyright:
|
23
|
-
Description: 'Include a copyright notice in each file before any code.'
|
24
|
-
Enabled: false
|
25
|
-
|
26
|
-
Style/Encoding:
|
27
|
-
Description: 'Use UTF-8 as the source file encoding.'
|
28
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#utf-8'
|
29
|
-
Enabled: false
|
30
|
-
|
31
|
-
Style/FirstArrayElementLineBreak:
|
32
|
-
Description: >-
|
33
|
-
Checks for a line break before the first element in a
|
34
|
-
multi-line array.
|
35
|
-
Enabled: false
|
36
|
-
|
37
|
-
Style/FirstHashElementLineBreak:
|
38
|
-
Description: >-
|
39
|
-
Checks for a line break before the first element in a
|
40
|
-
multi-line hash.
|
41
|
-
Enabled: false
|
42
|
-
|
43
|
-
Style/FirstMethodArgumentLineBreak:
|
44
|
-
Description: >-
|
45
|
-
Checks for a line break before the first argument in a
|
46
|
-
multi-line method call.
|
47
|
-
Enabled: false
|
48
|
-
|
49
|
-
Style/FirstMethodParameterLineBreak:
|
50
|
-
Description: >-
|
51
|
-
Checks for a line break before the first parameter in a
|
52
|
-
multi-line method parameter definition.
|
53
|
-
Enabled: false
|
54
|
-
|
55
|
-
Style/ImplicitRuntimeError:
|
56
|
-
Description: >-
|
57
|
-
Use `raise` or `fail` with an explicit exception class and
|
58
|
-
message, rather than just a message.
|
59
|
-
Enabled: false
|
60
|
-
|
61
|
-
Style/InlineComment:
|
62
|
-
Description: 'Avoid trailing inline comments.'
|
63
|
-
Enabled: false
|
64
|
-
|
65
|
-
Style/MethodCalledOnDoEndBlock:
|
66
|
-
Description: 'Avoid chaining a method call on a do...end block.'
|
67
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
68
|
-
Enabled: false
|
69
|
-
|
70
|
-
Style/MissingElse:
|
71
|
-
Description: >-
|
72
|
-
Require if/case expressions to have an else branches.
|
73
|
-
If enabled, it is recommended that
|
74
|
-
Style/UnlessElse and Style/EmptyElse be enabled.
|
75
|
-
This will conflict with Style/EmptyElse if
|
76
|
-
Style/EmptyElse is configured to style "both"
|
77
|
-
Enabled: false
|
78
|
-
EnforcedStyle: both
|
79
|
-
SupportedStyles:
|
80
|
-
# if - warn when an if expression is missing an else branch
|
81
|
-
# case - warn when a case expression is missing an else branch
|
82
|
-
# both - warn when an if or case expression is missing an else branch
|
83
|
-
- if
|
84
|
-
- case
|
85
|
-
- both
|
86
|
-
|
87
|
-
Style/MultilineAssignmentLayout:
|
88
|
-
Description: 'Check for a newline after the assignment operator in multi-line assignments.'
|
89
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-conditional-assignment'
|
90
|
-
Enabled: false
|
91
|
-
|
92
|
-
Style/OptionHash:
|
93
|
-
Description: "Don't use option hashes when you can use keyword arguments."
|
94
|
-
Enabled: false
|
95
|
-
|
96
|
-
Style/Send:
|
97
|
-
Description: 'Prefer `Object#__send__` or `Object#public_send` to `send`, as `send` may overlap with existing methods.'
|
98
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#prefer-public-send'
|
99
|
-
Enabled: false
|
100
|
-
|
101
|
-
Style/StringMethods:
|
102
|
-
Description: 'Checks if configured preferred methods are used over non-preferred.'
|
103
|
-
Enabled: false
|
104
|
-
|
105
|
-
Style/SymbolArray:
|
106
|
-
Description: 'Use %i or %I for arrays of symbols.'
|
107
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-i'
|
108
|
-
Enabled: false
|
data/enabled.yml
DELETED
@@ -1,1506 +0,0 @@
|
|
1
|
-
# These are all the cops that are enabled in the default configuration.
|
2
|
-
|
3
|
-
Style/AccessModifierIndentation:
|
4
|
-
Description: Check indentation of private/protected visibility modifiers.
|
5
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
|
6
|
-
Enabled: true
|
7
|
-
|
8
|
-
Style/AccessorMethodName:
|
9
|
-
Description: Check the naming of accessor methods for get_/set_.
|
10
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#accessor_mutator_method_names'
|
11
|
-
Enabled: true
|
12
|
-
|
13
|
-
Style/Alias:
|
14
|
-
Description: 'Use alias instead of alias_method.'
|
15
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
|
16
|
-
Enabled: true
|
17
|
-
|
18
|
-
Style/AlignArray:
|
19
|
-
Description: >-
|
20
|
-
Align the elements of an array literal if they span more than
|
21
|
-
one line.
|
22
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
|
23
|
-
Enabled: true
|
24
|
-
|
25
|
-
Style/AlignHash:
|
26
|
-
Description: >-
|
27
|
-
Align the elements of a hash literal if they span more than
|
28
|
-
one line.
|
29
|
-
Enabled: true
|
30
|
-
|
31
|
-
Style/AlignParameters:
|
32
|
-
Description: >-
|
33
|
-
Align the parameters of a method call if they span more
|
34
|
-
than one line.
|
35
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
|
36
|
-
Enabled: true
|
37
|
-
|
38
|
-
Style/AndOr:
|
39
|
-
Description: 'Use &&/|| instead of and/or.'
|
40
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
|
41
|
-
Enabled: true
|
42
|
-
|
43
|
-
Style/ArrayJoin:
|
44
|
-
Description: 'Use Array#join instead of Array#*.'
|
45
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
|
46
|
-
Enabled: true
|
47
|
-
|
48
|
-
Style/AsciiComments:
|
49
|
-
Description: 'Use only ascii symbols in comments.'
|
50
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
|
51
|
-
Enabled: true
|
52
|
-
|
53
|
-
Style/AsciiIdentifiers:
|
54
|
-
Description: 'Use only ascii symbols in identifiers.'
|
55
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
|
56
|
-
Enabled: true
|
57
|
-
|
58
|
-
Style/Attr:
|
59
|
-
Description: 'Checks for uses of Module#attr.'
|
60
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
|
61
|
-
Enabled: true
|
62
|
-
|
63
|
-
Style/BeginBlock:
|
64
|
-
Description: 'Avoid the use of BEGIN blocks.'
|
65
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
|
66
|
-
Enabled: true
|
67
|
-
|
68
|
-
Style/BarePercentLiterals:
|
69
|
-
Description: 'Checks if usage of %() or %Q() matches configuration.'
|
70
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
|
71
|
-
Enabled: true
|
72
|
-
|
73
|
-
Style/BlockComments:
|
74
|
-
Description: 'Do not use block comments.'
|
75
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
|
76
|
-
Enabled: true
|
77
|
-
|
78
|
-
Style/BlockEndNewline:
|
79
|
-
Description: 'Put end statement of multiline block on its own line.'
|
80
|
-
Enabled: true
|
81
|
-
|
82
|
-
Style/BlockDelimiters:
|
83
|
-
Description: >-
|
84
|
-
Avoid using {...} for multi-line blocks (multiline chaining is
|
85
|
-
always ugly).
|
86
|
-
Prefer {...} over do...end for single-line blocks.
|
87
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
88
|
-
Enabled: true
|
89
|
-
|
90
|
-
Style/BracesAroundHashParameters:
|
91
|
-
Description: 'Enforce braces style around hash parameters.'
|
92
|
-
Enabled: true
|
93
|
-
|
94
|
-
Style/CaseEquality:
|
95
|
-
Description: 'Avoid explicit use of the case equality operator(===).'
|
96
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
|
97
|
-
Enabled: true
|
98
|
-
|
99
|
-
Style/CaseIndentation:
|
100
|
-
Description: 'Indentation of when in a case/when/[else/]end.'
|
101
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
|
102
|
-
Enabled: true
|
103
|
-
|
104
|
-
Style/CharacterLiteral:
|
105
|
-
Description: 'Checks for uses of character literals.'
|
106
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
|
107
|
-
Enabled: true
|
108
|
-
|
109
|
-
Style/ClassAndModuleCamelCase:
|
110
|
-
Description: 'Use CamelCase for classes and modules.'
|
111
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
|
112
|
-
Enabled: true
|
113
|
-
|
114
|
-
Style/ClassAndModuleChildren:
|
115
|
-
Description: 'Checks style of children classes and modules.'
|
116
|
-
Enabled: true
|
117
|
-
|
118
|
-
Style/ClassCheck:
|
119
|
-
Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
|
120
|
-
Enabled: true
|
121
|
-
|
122
|
-
Style/ClassMethods:
|
123
|
-
Description: 'Use self when defining module/class methods.'
|
124
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
|
125
|
-
Enabled: true
|
126
|
-
|
127
|
-
Style/ClassVars:
|
128
|
-
Description: 'Avoid the use of class variables.'
|
129
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
|
130
|
-
Enabled: true
|
131
|
-
|
132
|
-
Style/ClosingParenthesisIndentation:
|
133
|
-
Description: 'Checks the indentation of hanging closing parentheses.'
|
134
|
-
Enabled: true
|
135
|
-
|
136
|
-
Style/ColonMethodCall:
|
137
|
-
Description: 'Do not use :: for method call.'
|
138
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
|
139
|
-
Enabled: true
|
140
|
-
|
141
|
-
Style/CommandLiteral:
|
142
|
-
Description: 'Use `` or %x around command literals.'
|
143
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
|
144
|
-
Enabled: true
|
145
|
-
|
146
|
-
Style/CommentAnnotation:
|
147
|
-
Description: >-
|
148
|
-
Checks formatting of special comments
|
149
|
-
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
150
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
|
151
|
-
Enabled: true
|
152
|
-
|
153
|
-
Style/CommentIndentation:
|
154
|
-
Description: 'Indentation of comments.'
|
155
|
-
Enabled: true
|
156
|
-
|
157
|
-
Style/ConditionalAssignment:
|
158
|
-
Description: >-
|
159
|
-
Use the return value of `if` and `case` statements for
|
160
|
-
assignment to a variable and variable comparison instead
|
161
|
-
of assigning that variable inside of each branch.
|
162
|
-
Enabled: true
|
163
|
-
|
164
|
-
Style/ConstantName:
|
165
|
-
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
|
166
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
|
167
|
-
Enabled: true
|
168
|
-
|
169
|
-
Style/DefWithParentheses:
|
170
|
-
Description: 'Use def with parentheses when there are arguments.'
|
171
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
172
|
-
Enabled: true
|
173
|
-
|
174
|
-
Style/PreferredHashMethods:
|
175
|
-
Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
|
176
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
|
177
|
-
Enabled: true
|
178
|
-
|
179
|
-
Style/Documentation:
|
180
|
-
Description: 'Document classes and non-namespace modules.'
|
181
|
-
Enabled: true
|
182
|
-
Exclude:
|
183
|
-
- 'spec/**/*'
|
184
|
-
- 'test/**/*'
|
185
|
-
|
186
|
-
Style/DocumentationMethod:
|
187
|
-
Description: 'Public methods.'
|
188
|
-
Enabled: true
|
189
|
-
Exclude:
|
190
|
-
- 'spec/**/*'
|
191
|
-
- 'test/**/*'
|
192
|
-
|
193
|
-
Style/DotPosition:
|
194
|
-
Description: 'Checks the position of the dot in multi-line method calls.'
|
195
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
|
196
|
-
Enabled: true
|
197
|
-
|
198
|
-
Style/DoubleNegation:
|
199
|
-
Description: 'Checks for uses of double negation (!!).'
|
200
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
|
201
|
-
Enabled: true
|
202
|
-
|
203
|
-
Style/EachForSimpleLoop:
|
204
|
-
Description: >-
|
205
|
-
Use `Integer#times` for a simple loop which iterates a fixed
|
206
|
-
number of times.
|
207
|
-
Enabled: true
|
208
|
-
|
209
|
-
Style/EachWithObject:
|
210
|
-
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
|
211
|
-
Enabled: true
|
212
|
-
|
213
|
-
Style/ElseAlignment:
|
214
|
-
Description: 'Align elses and elsifs correctly.'
|
215
|
-
Enabled: true
|
216
|
-
|
217
|
-
Style/EmptyElse:
|
218
|
-
Description: 'Avoid empty else-clauses.'
|
219
|
-
Enabled: true
|
220
|
-
|
221
|
-
Style/EmptyCaseCondition:
|
222
|
-
Description: 'Avoid empty condition in case statements.'
|
223
|
-
Enabled: true
|
224
|
-
|
225
|
-
Style/EmptyLineBetweenDefs:
|
226
|
-
Description: 'Use empty lines between defs.'
|
227
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
|
228
|
-
Enabled: true
|
229
|
-
|
230
|
-
Style/EmptyLines:
|
231
|
-
Description: "Don't use several empty lines in a row."
|
232
|
-
Enabled: true
|
233
|
-
|
234
|
-
Style/EmptyLinesAroundAccessModifier:
|
235
|
-
Description: "Keep blank lines around access modifiers."
|
236
|
-
Enabled: true
|
237
|
-
|
238
|
-
Style/EmptyLinesAroundBlockBody:
|
239
|
-
Description: "Keeps track of empty lines around block bodies."
|
240
|
-
Enabled: true
|
241
|
-
|
242
|
-
Style/EmptyLinesAroundClassBody:
|
243
|
-
Description: "Keeps track of empty lines around class bodies."
|
244
|
-
Enabled: true
|
245
|
-
|
246
|
-
Style/EmptyLinesAroundModuleBody:
|
247
|
-
Description: "Keeps track of empty lines around module bodies."
|
248
|
-
Enabled: true
|
249
|
-
|
250
|
-
Style/EmptyLinesAroundMethodBody:
|
251
|
-
Description: "Keeps track of empty lines around method bodies."
|
252
|
-
Enabled: true
|
253
|
-
|
254
|
-
Style/EmptyLiteral:
|
255
|
-
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
256
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
|
257
|
-
Enabled: true
|
258
|
-
|
259
|
-
Style/EndBlock:
|
260
|
-
Description: 'Avoid the use of END blocks.'
|
261
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
|
262
|
-
Enabled: true
|
263
|
-
|
264
|
-
Style/EndOfLine:
|
265
|
-
Description: 'Use Unix-style line endings.'
|
266
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
|
267
|
-
Enabled: true
|
268
|
-
|
269
|
-
Style/EvenOdd:
|
270
|
-
Description: 'Favor the use of Integer#even? && Integer#odd?'
|
271
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
272
|
-
Enabled: true
|
273
|
-
|
274
|
-
Style/ExtraSpacing:
|
275
|
-
Description: 'Do not use unnecessary spacing.'
|
276
|
-
Enabled: true
|
277
|
-
|
278
|
-
Style/FileName:
|
279
|
-
Description: 'Use snake_case for source file names.'
|
280
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
|
281
|
-
Enabled: true
|
282
|
-
|
283
|
-
Style/FrozenStringLiteralComment:
|
284
|
-
Description: >-
|
285
|
-
Add the frozen_string_literal comment to the top of files
|
286
|
-
to help transition from Ruby 2.3.0 to Ruby 3.0.
|
287
|
-
Enabled: true
|
288
|
-
|
289
|
-
Style/InitialIndentation:
|
290
|
-
Description: >-
|
291
|
-
Checks the indentation of the first non-blank non-comment line in a file.
|
292
|
-
Enabled: true
|
293
|
-
|
294
|
-
Style/FirstParameterIndentation:
|
295
|
-
Description: 'Checks the indentation of the first parameter in a method call.'
|
296
|
-
Enabled: true
|
297
|
-
|
298
|
-
Style/FlipFlop:
|
299
|
-
Description: 'Checks for flip flops'
|
300
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
|
301
|
-
Enabled: true
|
302
|
-
|
303
|
-
Style/For:
|
304
|
-
Description: 'Checks use of for or each in multiline loops.'
|
305
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
|
306
|
-
Enabled: true
|
307
|
-
|
308
|
-
Style/FormatString:
|
309
|
-
Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
|
310
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
|
311
|
-
Enabled: true
|
312
|
-
|
313
|
-
Style/GlobalVars:
|
314
|
-
Description: 'Do not introduce global variables.'
|
315
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
|
316
|
-
Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
|
317
|
-
Enabled: true
|
318
|
-
|
319
|
-
Style/GuardClause:
|
320
|
-
Description: 'Check for conditionals that can be replaced with guard clauses'
|
321
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
322
|
-
Enabled: true
|
323
|
-
|
324
|
-
Style/HashSyntax:
|
325
|
-
Description: >-
|
326
|
-
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
|
327
|
-
{ :a => 1, :b => 2 }.
|
328
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
|
329
|
-
Enabled: true
|
330
|
-
|
331
|
-
Style/IfInsideElse:
|
332
|
-
Description: 'Finds if nodes inside else, which can be converted to elsif.'
|
333
|
-
Enabled: true
|
334
|
-
|
335
|
-
Style/IfUnlessModifier:
|
336
|
-
Description: >-
|
337
|
-
Favor modifier if/unless usage when you have a
|
338
|
-
single-line body.
|
339
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
|
340
|
-
Enabled: true
|
341
|
-
|
342
|
-
Style/IfUnlessModifierOfIfUnless:
|
343
|
-
Description: >-
|
344
|
-
Avoid modifier if/unless usage on conditionals.
|
345
|
-
Enabled: true
|
346
|
-
|
347
|
-
Style/IfWithSemicolon:
|
348
|
-
Description: 'Do not use if x; .... Use the ternary operator instead.'
|
349
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
|
350
|
-
Enabled: true
|
351
|
-
|
352
|
-
Style/IndentationConsistency:
|
353
|
-
Description: 'Keep indentation straight.'
|
354
|
-
Enabled: true
|
355
|
-
|
356
|
-
Style/IndentationWidth:
|
357
|
-
Description: 'Use 2 spaces for indentation.'
|
358
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
359
|
-
Enabled: true
|
360
|
-
|
361
|
-
Style/IdenticalConditionalBranches:
|
362
|
-
Description: >-
|
363
|
-
Checks that conditional statements do not have an identical
|
364
|
-
line at the end of each branch, which can validly be moved
|
365
|
-
out of the conditional.
|
366
|
-
Enabled: true
|
367
|
-
|
368
|
-
Style/IndentArray:
|
369
|
-
Description: >-
|
370
|
-
Checks the indentation of the first element in an array
|
371
|
-
literal.
|
372
|
-
Enabled: true
|
373
|
-
|
374
|
-
Style/IndentAssignment:
|
375
|
-
Description: >-
|
376
|
-
Checks the indentation of the first line of the
|
377
|
-
right-hand-side of a multi-line assignment.
|
378
|
-
Enabled: true
|
379
|
-
|
380
|
-
Style/IndentHash:
|
381
|
-
Description: 'Checks the indentation of the first key in a hash literal.'
|
382
|
-
Enabled: true
|
383
|
-
|
384
|
-
Style/InfiniteLoop:
|
385
|
-
Description: 'Use Kernel#loop for infinite loops.'
|
386
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
|
387
|
-
Enabled: true
|
388
|
-
|
389
|
-
Style/Lambda:
|
390
|
-
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
391
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
|
392
|
-
Enabled: true
|
393
|
-
|
394
|
-
Style/LambdaCall:
|
395
|
-
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
396
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
|
397
|
-
Enabled: true
|
398
|
-
|
399
|
-
Style/LeadingCommentSpace:
|
400
|
-
Description: 'Comments should start with a space.'
|
401
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
|
402
|
-
Enabled: true
|
403
|
-
|
404
|
-
Style/LineEndConcatenation:
|
405
|
-
Description: >-
|
406
|
-
Use \ instead of + or << to concatenate two string literals at
|
407
|
-
line end.
|
408
|
-
Enabled: true
|
409
|
-
|
410
|
-
Style/MethodCallParentheses:
|
411
|
-
Description: 'Do not use parentheses for method calls with no arguments.'
|
412
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-invocation-parens'
|
413
|
-
Enabled: true
|
414
|
-
|
415
|
-
Style/MethodDefParentheses:
|
416
|
-
Description: >-
|
417
|
-
Checks if the method definitions have or don't have
|
418
|
-
parentheses.
|
419
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
420
|
-
Enabled: true
|
421
|
-
|
422
|
-
Style/MethodName:
|
423
|
-
Description: 'Use the configured style when naming methods.'
|
424
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
|
425
|
-
Enabled: true
|
426
|
-
|
427
|
-
Style/MethodMissing:
|
428
|
-
Description: 'Avoid using `method_missing`.'
|
429
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-method-missing'
|
430
|
-
Enabled: true
|
431
|
-
|
432
|
-
Style/ModuleFunction:
|
433
|
-
Description: 'Checks for usage of `extend self` in modules.'
|
434
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
|
435
|
-
Enabled: true
|
436
|
-
|
437
|
-
Style/MultilineArrayBraceLayout:
|
438
|
-
Description: >-
|
439
|
-
Checks that the closing brace in an array literal is
|
440
|
-
either on the same line as the last array element, or
|
441
|
-
a new line.
|
442
|
-
Enabled: true
|
443
|
-
|
444
|
-
Style/MultilineBlockChain:
|
445
|
-
Description: 'Avoid multi-line chains of blocks.'
|
446
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
447
|
-
Enabled: true
|
448
|
-
|
449
|
-
Style/MultilineBlockLayout:
|
450
|
-
Description: 'Ensures newlines after multiline block do statements.'
|
451
|
-
Enabled: true
|
452
|
-
|
453
|
-
Style/MultilineHashBraceLayout:
|
454
|
-
Description: >-
|
455
|
-
Checks that the closing brace in a hash literal is
|
456
|
-
either on the same line as the last hash element, or
|
457
|
-
a new line.
|
458
|
-
Enabled: true
|
459
|
-
|
460
|
-
Style/MultilineIfThen:
|
461
|
-
Description: 'Do not use then for multi-line if/unless.'
|
462
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
|
463
|
-
Enabled: true
|
464
|
-
|
465
|
-
Style/MultilineMethodCallBraceLayout:
|
466
|
-
Description: >-
|
467
|
-
Checks that the closing brace in a method call is
|
468
|
-
either on the same line as the last method argument, or
|
469
|
-
a new line.
|
470
|
-
Enabled: true
|
471
|
-
|
472
|
-
Style/MultilineMethodCallIndentation:
|
473
|
-
Description: >-
|
474
|
-
Checks indentation of method calls with the dot operator
|
475
|
-
that span more than one line.
|
476
|
-
Enabled: true
|
477
|
-
|
478
|
-
Style/MultilineMethodDefinitionBraceLayout:
|
479
|
-
Description: >-
|
480
|
-
Checks that the closing brace in a method definition is
|
481
|
-
either on the same line as the last method parameter, or
|
482
|
-
a new line.
|
483
|
-
Enabled: true
|
484
|
-
|
485
|
-
Style/MultilineOperationIndentation:
|
486
|
-
Description: >-
|
487
|
-
Checks indentation of binary operations that span more than
|
488
|
-
one line.
|
489
|
-
Enabled: true
|
490
|
-
|
491
|
-
Style/MultilineTernaryOperator:
|
492
|
-
Description: >-
|
493
|
-
Avoid multi-line ?: (the ternary operator);
|
494
|
-
use if/unless instead.
|
495
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
|
496
|
-
Enabled: true
|
497
|
-
|
498
|
-
Style/MutableConstant:
|
499
|
-
Description: 'Do not assign mutable objects to constants.'
|
500
|
-
Enabled: true
|
501
|
-
|
502
|
-
Style/NegatedIf:
|
503
|
-
Description: >-
|
504
|
-
Favor unless over if for negative conditions
|
505
|
-
(or control flow or).
|
506
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
|
507
|
-
Enabled: true
|
508
|
-
|
509
|
-
Style/NegatedWhile:
|
510
|
-
Description: 'Favor until over while for negative conditions.'
|
511
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
|
512
|
-
Enabled: true
|
513
|
-
|
514
|
-
Style/NestedModifier:
|
515
|
-
Description: 'Avoid using nested modifiers.'
|
516
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-modifiers'
|
517
|
-
Enabled: true
|
518
|
-
|
519
|
-
Style/NestedParenthesizedCalls:
|
520
|
-
Description: >-
|
521
|
-
Parenthesize method calls which are nested inside the
|
522
|
-
argument list of another parenthesized method call.
|
523
|
-
Enabled: true
|
524
|
-
|
525
|
-
Style/NestedTernaryOperator:
|
526
|
-
Description: 'Use one expression per branch in a ternary operator.'
|
527
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
|
528
|
-
Enabled: true
|
529
|
-
|
530
|
-
Style/Next:
|
531
|
-
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
532
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
533
|
-
Enabled: true
|
534
|
-
|
535
|
-
Style/NilComparison:
|
536
|
-
Description: 'Prefer x.nil? to x == nil.'
|
537
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
538
|
-
Enabled: true
|
539
|
-
|
540
|
-
Style/NonNilCheck:
|
541
|
-
Description: 'Checks for redundant nil checks.'
|
542
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
|
543
|
-
Enabled: true
|
544
|
-
|
545
|
-
Style/Not:
|
546
|
-
Description: 'Use ! instead of not.'
|
547
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
|
548
|
-
Enabled: true
|
549
|
-
|
550
|
-
Style/NumericLiterals:
|
551
|
-
Description: >-
|
552
|
-
Add underscores to large numeric literals to improve their
|
553
|
-
readability.
|
554
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
|
555
|
-
Enabled: true
|
556
|
-
|
557
|
-
Style/NumericLiteralPrefix:
|
558
|
-
Description: 'Use smallcase prefixes for numeric literals.'
|
559
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#numeric-literal-prefixes'
|
560
|
-
Enabled: true
|
561
|
-
|
562
|
-
Style/NumericPredicate:
|
563
|
-
Description: >-
|
564
|
-
Checks for the use of predicate- or comparison methods for
|
565
|
-
numeric comparisons.
|
566
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
567
|
-
Enabled: true
|
568
|
-
|
569
|
-
Style/OneLineConditional:
|
570
|
-
Description: >-
|
571
|
-
Favor the ternary operator(?:) over
|
572
|
-
if/then/else/end constructs.
|
573
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
|
574
|
-
Enabled: true
|
575
|
-
|
576
|
-
Style/OpMethod:
|
577
|
-
Description: 'When defining binary operators, name the argument other.'
|
578
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
|
579
|
-
Enabled: true
|
580
|
-
|
581
|
-
Style/OptionalArguments:
|
582
|
-
Description: >-
|
583
|
-
Checks for optional arguments that do not appear at the end
|
584
|
-
of the argument list
|
585
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
|
586
|
-
Enabled: true
|
587
|
-
|
588
|
-
Style/ParallelAssignment:
|
589
|
-
Description: >-
|
590
|
-
Check for simple usages of parallel assignment.
|
591
|
-
It will only warn when the number of variables
|
592
|
-
matches on both sides of the assignment.
|
593
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
|
594
|
-
Enabled: true
|
595
|
-
|
596
|
-
Style/ParenthesesAroundCondition:
|
597
|
-
Description: >-
|
598
|
-
Don't use parentheses around the condition of an
|
599
|
-
if/unless/while.
|
600
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
|
601
|
-
Enabled: true
|
602
|
-
|
603
|
-
Style/PercentLiteralDelimiters:
|
604
|
-
Description: 'Use `%`-literal delimiters consistently'
|
605
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
|
606
|
-
Enabled: true
|
607
|
-
|
608
|
-
Style/PercentQLiterals:
|
609
|
-
Description: 'Checks if uses of %Q/%q match the configured preference.'
|
610
|
-
Enabled: true
|
611
|
-
|
612
|
-
Style/PerlBackrefs:
|
613
|
-
Description: 'Avoid Perl-style regex back references.'
|
614
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
|
615
|
-
Enabled: true
|
616
|
-
|
617
|
-
Style/PredicateName:
|
618
|
-
Description: 'Check the names of predicate methods.'
|
619
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
|
620
|
-
Enabled: true
|
621
|
-
|
622
|
-
Style/Proc:
|
623
|
-
Description: 'Use proc instead of Proc.new.'
|
624
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
|
625
|
-
Enabled: true
|
626
|
-
|
627
|
-
Style/RaiseArgs:
|
628
|
-
Description: 'Checks the arguments passed to raise/fail.'
|
629
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
|
630
|
-
Enabled: true
|
631
|
-
|
632
|
-
Style/RedundantBegin:
|
633
|
-
Description: "Don't use begin blocks when they are not needed."
|
634
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
|
635
|
-
Enabled: true
|
636
|
-
|
637
|
-
Style/RedundantException:
|
638
|
-
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
|
639
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
|
640
|
-
Enabled: true
|
641
|
-
|
642
|
-
Style/RedundantFreeze:
|
643
|
-
Description: "Checks usages of Object#freeze on immutable objects."
|
644
|
-
Enabled: true
|
645
|
-
|
646
|
-
Style/RedundantParentheses:
|
647
|
-
Description: "Checks for parentheses that seem not to serve any purpose."
|
648
|
-
Enabled: true
|
649
|
-
|
650
|
-
Style/RedundantReturn:
|
651
|
-
Description: "Don't use return where it's not required."
|
652
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
|
653
|
-
Enabled: true
|
654
|
-
|
655
|
-
Style/RedundantSelf:
|
656
|
-
Description: "Don't use self where it's not needed."
|
657
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
|
658
|
-
Enabled: true
|
659
|
-
|
660
|
-
Style/RegexpLiteral:
|
661
|
-
Description: 'Use / or %r around regular expressions.'
|
662
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
|
663
|
-
Enabled: true
|
664
|
-
|
665
|
-
Style/RescueEnsureAlignment:
|
666
|
-
Description: 'Align rescues and ensures correctly.'
|
667
|
-
Enabled: true
|
668
|
-
|
669
|
-
Style/RescueModifier:
|
670
|
-
Description: 'Avoid using rescue in its modifier form.'
|
671
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
|
672
|
-
Enabled: true
|
673
|
-
|
674
|
-
Style/SafeNavigation:
|
675
|
-
Description: >-
|
676
|
-
This cop transforms usages of a method call safeguarded by
|
677
|
-
a check for the existance of the object to
|
678
|
-
safe navigation (`&.`).
|
679
|
-
Enabled: true
|
680
|
-
|
681
|
-
Style/SelfAssignment:
|
682
|
-
Description: >-
|
683
|
-
Checks for places where self-assignment shorthand should have
|
684
|
-
been used.
|
685
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
|
686
|
-
Enabled: true
|
687
|
-
|
688
|
-
Style/Semicolon:
|
689
|
-
Description: "Don't use semicolons to terminate expressions."
|
690
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
|
691
|
-
Enabled: true
|
692
|
-
|
693
|
-
Style/SignalException:
|
694
|
-
Description: 'Checks for proper usage of fail and raise.'
|
695
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#prefer-raise-over-fail'
|
696
|
-
Enabled: true
|
697
|
-
|
698
|
-
Style/SingleLineBlockParams:
|
699
|
-
Description: 'Enforces the names of some block params.'
|
700
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
|
701
|
-
Enabled: true
|
702
|
-
|
703
|
-
Style/SingleLineMethods:
|
704
|
-
Description: 'Avoid single-line methods.'
|
705
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
|
706
|
-
Enabled: true
|
707
|
-
|
708
|
-
Style/SpaceBeforeFirstArg:
|
709
|
-
Description: >-
|
710
|
-
Checks that exactly one space is used between a method name
|
711
|
-
and the first argument for method calls without parentheses.
|
712
|
-
Enabled: true
|
713
|
-
|
714
|
-
Style/SpaceAfterColon:
|
715
|
-
Description: 'Use spaces after colons.'
|
716
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
717
|
-
Enabled: true
|
718
|
-
|
719
|
-
Style/SpaceAfterComma:
|
720
|
-
Description: 'Use spaces after commas.'
|
721
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
722
|
-
Enabled: true
|
723
|
-
|
724
|
-
Style/SpaceAfterMethodName:
|
725
|
-
Description: >-
|
726
|
-
Do not put a space between a method name and the opening
|
727
|
-
parenthesis in a method definition.
|
728
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
729
|
-
Enabled: true
|
730
|
-
|
731
|
-
Style/SpaceAfterNot:
|
732
|
-
Description: Tracks redundant space after the ! operator.
|
733
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
|
734
|
-
Enabled: true
|
735
|
-
|
736
|
-
Style/SpaceAfterSemicolon:
|
737
|
-
Description: 'Use spaces after semicolons.'
|
738
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
739
|
-
Enabled: true
|
740
|
-
|
741
|
-
Style/SpaceBeforeBlockBraces:
|
742
|
-
Description: >-
|
743
|
-
Checks that the left block brace has or doesn't have space
|
744
|
-
before it.
|
745
|
-
Enabled: true
|
746
|
-
|
747
|
-
Style/SpaceBeforeComma:
|
748
|
-
Description: 'No spaces before commas.'
|
749
|
-
Enabled: true
|
750
|
-
|
751
|
-
Style/SpaceBeforeComment:
|
752
|
-
Description: >-
|
753
|
-
Checks for missing space between code and a comment on the
|
754
|
-
same line.
|
755
|
-
Enabled: true
|
756
|
-
|
757
|
-
Style/SpaceBeforeSemicolon:
|
758
|
-
Description: 'No spaces before semicolons.'
|
759
|
-
Enabled: true
|
760
|
-
|
761
|
-
Style/SpaceInsideBlockBraces:
|
762
|
-
Description: >-
|
763
|
-
Checks that block braces have or don't have surrounding space.
|
764
|
-
For blocks taking parameters, checks that the left brace has
|
765
|
-
or doesn't have trailing space.
|
766
|
-
Enabled: true
|
767
|
-
|
768
|
-
Style/SpaceAroundBlockParameters:
|
769
|
-
Description: 'Checks the spacing inside and after block parameters pipes.'
|
770
|
-
Enabled: true
|
771
|
-
|
772
|
-
Style/SpaceAroundEqualsInParameterDefault:
|
773
|
-
Description: >-
|
774
|
-
Checks that the equals signs in parameter default assignments
|
775
|
-
have or don't have surrounding space depending on
|
776
|
-
configuration.
|
777
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
|
778
|
-
Enabled: true
|
779
|
-
|
780
|
-
Style/SpaceAroundKeyword:
|
781
|
-
Description: 'Use a space around keywords if appropriate.'
|
782
|
-
Enabled: true
|
783
|
-
|
784
|
-
Style/SpaceAroundOperators:
|
785
|
-
Description: 'Use a single space around operators.'
|
786
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
787
|
-
Enabled: true
|
788
|
-
|
789
|
-
Style/SpaceInsideArrayPercentLiteral:
|
790
|
-
Description: 'No unnecessary additional spaces between elements in %i/%w literals.'
|
791
|
-
Enabled: true
|
792
|
-
|
793
|
-
Style/SpaceInsidePercentLiteralDelimiters:
|
794
|
-
Description: 'No unnecessary spaces inside delimiters of %i/%w/%x literals.'
|
795
|
-
Enabled: true
|
796
|
-
|
797
|
-
Style/SpaceInsideBrackets:
|
798
|
-
Description: 'No spaces after [ or before ].'
|
799
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
|
800
|
-
Enabled: true
|
801
|
-
|
802
|
-
Style/SpaceInsideHashLiteralBraces:
|
803
|
-
Description: "Use spaces inside hash literal braces - or don't."
|
804
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
805
|
-
Enabled: true
|
806
|
-
|
807
|
-
Style/SpaceInsideParens:
|
808
|
-
Description: 'No spaces after ( or before ).'
|
809
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
|
810
|
-
Enabled: true
|
811
|
-
|
812
|
-
Style/SpaceInsideRangeLiteral:
|
813
|
-
Description: 'No spaces inside range literals.'
|
814
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
|
815
|
-
Enabled: true
|
816
|
-
|
817
|
-
Style/SpaceInsideStringInterpolation:
|
818
|
-
Description: 'Checks for padding/surrounding spaces inside string interpolation.'
|
819
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
|
820
|
-
Enabled: true
|
821
|
-
|
822
|
-
Style/SpecialGlobalVars:
|
823
|
-
Description: 'Avoid Perl-style global variables.'
|
824
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
|
825
|
-
Enabled: true
|
826
|
-
|
827
|
-
Style/StabbyLambdaParentheses:
|
828
|
-
Description: 'Check for the usage of parentheses around stabby lambda arguments.'
|
829
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#stabby-lambda-with-args'
|
830
|
-
Enabled: true
|
831
|
-
|
832
|
-
Style/StringLiterals:
|
833
|
-
Description: 'Checks if uses of quotes match the configured preference.'
|
834
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
|
835
|
-
Enabled: true
|
836
|
-
|
837
|
-
Style/StringLiteralsInInterpolation:
|
838
|
-
Description: >-
|
839
|
-
Checks if uses of quotes inside expressions in interpolated
|
840
|
-
strings match the configured preference.
|
841
|
-
Enabled: true
|
842
|
-
|
843
|
-
Style/StructInheritance:
|
844
|
-
Description: 'Checks for inheritance from Struct.new.'
|
845
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
|
846
|
-
Enabled: true
|
847
|
-
|
848
|
-
Style/SymbolLiteral:
|
849
|
-
Description: 'Use plain symbols instead of string symbols when possible.'
|
850
|
-
Enabled: true
|
851
|
-
|
852
|
-
Style/SymbolProc:
|
853
|
-
Description: 'Use symbols as procs instead of blocks when possible.'
|
854
|
-
Enabled: true
|
855
|
-
|
856
|
-
Style/Tab:
|
857
|
-
Description: 'No hard tabs.'
|
858
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
859
|
-
Enabled: true
|
860
|
-
|
861
|
-
Style/TernaryParentheses:
|
862
|
-
Description: 'Checks for use of parentheses around ternary conditions.'
|
863
|
-
Enabled: true
|
864
|
-
|
865
|
-
Style/TrailingBlankLines:
|
866
|
-
Description: 'Checks trailing blank lines and final newline.'
|
867
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
|
868
|
-
Enabled: true
|
869
|
-
|
870
|
-
Style/TrailingCommaInArguments:
|
871
|
-
Description: 'Checks for trailing comma in argument lists.'
|
872
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
|
873
|
-
Enabled: true
|
874
|
-
|
875
|
-
Style/TrailingCommaInLiteral:
|
876
|
-
Description: 'Checks for trailing comma in array and hash literals.'
|
877
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
878
|
-
Enabled: true
|
879
|
-
|
880
|
-
Style/TrailingWhitespace:
|
881
|
-
Description: 'Avoid trailing whitespace.'
|
882
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
|
883
|
-
Enabled: true
|
884
|
-
|
885
|
-
Style/TrivialAccessors:
|
886
|
-
Description: 'Prefer attr_* methods to trivial readers/writers.'
|
887
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
|
888
|
-
Enabled: true
|
889
|
-
|
890
|
-
Style/UnlessElse:
|
891
|
-
Description: >-
|
892
|
-
Do not use unless with else. Rewrite these with the positive
|
893
|
-
case first.
|
894
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
|
895
|
-
Enabled: true
|
896
|
-
|
897
|
-
Style/UnneededCapitalW:
|
898
|
-
Description: 'Checks for %W when interpolation is not needed.'
|
899
|
-
Enabled: true
|
900
|
-
|
901
|
-
Style/UnneededInterpolation:
|
902
|
-
Description: 'Checks for strings that are just an interpolated expression.'
|
903
|
-
Enabled: true
|
904
|
-
|
905
|
-
Style/UnneededPercentQ:
|
906
|
-
Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
|
907
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
|
908
|
-
Enabled: true
|
909
|
-
|
910
|
-
Style/TrailingUnderscoreVariable:
|
911
|
-
Description: >-
|
912
|
-
Checks for the usage of unneeded trailing underscores at the
|
913
|
-
end of parallel variable assignment.
|
914
|
-
AllowNamedUnderscoreVariables: true
|
915
|
-
Enabled: true
|
916
|
-
|
917
|
-
Style/VariableInterpolation:
|
918
|
-
Description: >-
|
919
|
-
Don't interpolate global, instance and class variables
|
920
|
-
directly in strings.
|
921
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
|
922
|
-
Enabled: true
|
923
|
-
|
924
|
-
Style/VariableName:
|
925
|
-
Description: 'Use the configured style when naming variables.'
|
926
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
|
927
|
-
Enabled: true
|
928
|
-
|
929
|
-
Style/VariableNumber:
|
930
|
-
Description: 'Use the configured style when numbering variables.'
|
931
|
-
Enabled: true
|
932
|
-
|
933
|
-
Style/WhenThen:
|
934
|
-
Description: 'Use when x then ... for one-line cases.'
|
935
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
|
936
|
-
Enabled: true
|
937
|
-
|
938
|
-
Style/WhileUntilDo:
|
939
|
-
Description: 'Checks for redundant do after while or until.'
|
940
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
|
941
|
-
Enabled: true
|
942
|
-
|
943
|
-
Style/WhileUntilModifier:
|
944
|
-
Description: >-
|
945
|
-
Favor modifier while/until usage when you have a
|
946
|
-
single-line body.
|
947
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
|
948
|
-
Enabled: true
|
949
|
-
|
950
|
-
Style/WordArray:
|
951
|
-
Description: 'Use %w or %W for arrays of words.'
|
952
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
|
953
|
-
Enabled: true
|
954
|
-
|
955
|
-
Style/ZeroLengthPredicate:
|
956
|
-
Description: 'Use #empty? when testing for objects of length 0.'
|
957
|
-
Enabled: true
|
958
|
-
|
959
|
-
#################### Metrics ################################
|
960
|
-
|
961
|
-
Metrics/AbcSize:
|
962
|
-
Description: >-
|
963
|
-
A calculated magnitude based on number of assignments,
|
964
|
-
branches, and conditions.
|
965
|
-
Reference: 'http://c2.com/cgi/wiki?AbcMetric'
|
966
|
-
Enabled: true
|
967
|
-
|
968
|
-
Metrics/BlockNesting:
|
969
|
-
Description: 'Avoid excessive block nesting'
|
970
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
|
971
|
-
Enabled: true
|
972
|
-
|
973
|
-
Metrics/ClassLength:
|
974
|
-
Description: 'Avoid classes longer than 100 lines of code.'
|
975
|
-
Enabled: true
|
976
|
-
|
977
|
-
Metrics/ModuleLength:
|
978
|
-
Description: 'Avoid modules longer than 100 lines of code.'
|
979
|
-
Enabled: true
|
980
|
-
|
981
|
-
Metrics/CyclomaticComplexity:
|
982
|
-
Description: >-
|
983
|
-
A complexity metric that is strongly correlated to the number
|
984
|
-
of test cases needed to validate a method.
|
985
|
-
Enabled: true
|
986
|
-
|
987
|
-
Metrics/LineLength:
|
988
|
-
Description: 'Limit lines to 80 characters.'
|
989
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
|
990
|
-
Enabled: true
|
991
|
-
|
992
|
-
Metrics/MethodLength:
|
993
|
-
Description: 'Avoid methods longer than 10 lines of code.'
|
994
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
|
995
|
-
Enabled: true
|
996
|
-
|
997
|
-
Metrics/ParameterLists:
|
998
|
-
Description: 'Avoid parameter lists longer than three or four parameters.'
|
999
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
|
1000
|
-
Enabled: true
|
1001
|
-
|
1002
|
-
Metrics/PerceivedComplexity:
|
1003
|
-
Description: >-
|
1004
|
-
A complexity metric geared towards measuring complexity for a
|
1005
|
-
human reader.
|
1006
|
-
Enabled: true
|
1007
|
-
|
1008
|
-
#################### Lint ################################
|
1009
|
-
### Warnings
|
1010
|
-
|
1011
|
-
Lint/AmbiguousOperator:
|
1012
|
-
Description: >-
|
1013
|
-
Checks for ambiguous operators in the first argument of a
|
1014
|
-
method invocation without parentheses.
|
1015
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-invocation-parens'
|
1016
|
-
Enabled: true
|
1017
|
-
|
1018
|
-
Lint/AmbiguousRegexpLiteral:
|
1019
|
-
Description: >-
|
1020
|
-
Checks for ambiguous regexp literals in the first argument of
|
1021
|
-
a method invocation without parentheses.
|
1022
|
-
Enabled: true
|
1023
|
-
|
1024
|
-
Lint/AssignmentInCondition:
|
1025
|
-
Description: "Don't use assignment in conditions."
|
1026
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
|
1027
|
-
Enabled: true
|
1028
|
-
|
1029
|
-
Lint/BlockAlignment:
|
1030
|
-
Description: 'Align block ends correctly.'
|
1031
|
-
Enabled: true
|
1032
|
-
|
1033
|
-
Lint/CircularArgumentReference:
|
1034
|
-
Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
|
1035
|
-
Enabled: true
|
1036
|
-
|
1037
|
-
Lint/ConditionPosition:
|
1038
|
-
Description: >-
|
1039
|
-
Checks for condition placed in a confusing position relative to
|
1040
|
-
the keyword.
|
1041
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
|
1042
|
-
Enabled: true
|
1043
|
-
|
1044
|
-
Lint/Debugger:
|
1045
|
-
Description: 'Check for debugger calls.'
|
1046
|
-
Enabled: true
|
1047
|
-
|
1048
|
-
Lint/DefEndAlignment:
|
1049
|
-
Description: 'Align ends corresponding to defs correctly.'
|
1050
|
-
Enabled: true
|
1051
|
-
|
1052
|
-
Lint/DeprecatedClassMethods:
|
1053
|
-
Description: 'Check for deprecated class method calls.'
|
1054
|
-
Enabled: true
|
1055
|
-
|
1056
|
-
Lint/DuplicateMethods:
|
1057
|
-
Description: 'Check for duplicate method definitions.'
|
1058
|
-
Enabled: true
|
1059
|
-
|
1060
|
-
Lint/DuplicatedKey:
|
1061
|
-
Description: 'Check for duplicate keys in hash literals.'
|
1062
|
-
Enabled: true
|
1063
|
-
|
1064
|
-
Lint/EachWithObjectArgument:
|
1065
|
-
Description: 'Check for immutable argument given to each_with_object.'
|
1066
|
-
Enabled: true
|
1067
|
-
|
1068
|
-
Lint/ElseLayout:
|
1069
|
-
Description: 'Check for odd code arrangement in an else block.'
|
1070
|
-
Enabled: true
|
1071
|
-
|
1072
|
-
Lint/EmptyEnsure:
|
1073
|
-
Description: 'Checks for empty ensure block.'
|
1074
|
-
Enabled: true
|
1075
|
-
|
1076
|
-
Lint/EmptyInterpolation:
|
1077
|
-
Description: 'Checks for empty string interpolation.'
|
1078
|
-
Enabled: true
|
1079
|
-
|
1080
|
-
Lint/EndAlignment:
|
1081
|
-
Description: 'Align ends correctly.'
|
1082
|
-
Enabled: true
|
1083
|
-
|
1084
|
-
Lint/EndInMethod:
|
1085
|
-
Description: 'END blocks should not be placed inside method definitions.'
|
1086
|
-
Enabled: true
|
1087
|
-
|
1088
|
-
Lint/EnsureReturn:
|
1089
|
-
Description: 'Do not use return in an ensure block.'
|
1090
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
|
1091
|
-
Enabled: true
|
1092
|
-
|
1093
|
-
Lint/Eval:
|
1094
|
-
Description: 'The use of eval represents a serious security risk.'
|
1095
|
-
Enabled: true
|
1096
|
-
|
1097
|
-
Lint/FloatOutOfRange:
|
1098
|
-
Description: >-
|
1099
|
-
Catches floating-point literals too large or small for Ruby to
|
1100
|
-
represent.
|
1101
|
-
Enabled: true
|
1102
|
-
|
1103
|
-
Lint/FormatParameterMismatch:
|
1104
|
-
Description: 'The number of parameters to format/sprint must match the fields.'
|
1105
|
-
Enabled: true
|
1106
|
-
|
1107
|
-
Lint/HandleExceptions:
|
1108
|
-
Description: "Don't suppress exception."
|
1109
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
|
1110
|
-
Enabled: true
|
1111
|
-
|
1112
|
-
Lint/ImplicitStringConcatenation:
|
1113
|
-
Description: >-
|
1114
|
-
Checks for adjacent string literals on the same line, which
|
1115
|
-
could better be represented as a single string literal.
|
1116
|
-
Enabled: true
|
1117
|
-
|
1118
|
-
Lint/IneffectiveAccessModifier:
|
1119
|
-
Description: >-
|
1120
|
-
Checks for attempts to use `private` or `protected` to set
|
1121
|
-
the visibility of a class method, which does not work.
|
1122
|
-
Enabled: true
|
1123
|
-
|
1124
|
-
Lint/InheritException:
|
1125
|
-
Description: 'Avoid inheriting from the `Exception` class.'
|
1126
|
-
Enabled: true
|
1127
|
-
|
1128
|
-
Lint/InvalidCharacterLiteral:
|
1129
|
-
Description: >-
|
1130
|
-
Checks for invalid character literals with a non-escaped
|
1131
|
-
whitespace character.
|
1132
|
-
Enabled: true
|
1133
|
-
|
1134
|
-
Lint/LiteralInCondition:
|
1135
|
-
Description: 'Checks of literals used in conditions.'
|
1136
|
-
Enabled: true
|
1137
|
-
|
1138
|
-
Lint/LiteralInInterpolation:
|
1139
|
-
Description: 'Checks for literals used in interpolation.'
|
1140
|
-
Enabled: true
|
1141
|
-
|
1142
|
-
Lint/Loop:
|
1143
|
-
Description: >-
|
1144
|
-
Use Kernel#loop with break rather than begin/end/until or
|
1145
|
-
begin/end/while for post-loop tests.
|
1146
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
|
1147
|
-
Enabled: true
|
1148
|
-
|
1149
|
-
Lint/NestedMethodDefinition:
|
1150
|
-
Description: 'Do not use nested method definitions.'
|
1151
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
|
1152
|
-
Enabled: true
|
1153
|
-
|
1154
|
-
Lint/NextWithoutAccumulator:
|
1155
|
-
Description: >-
|
1156
|
-
Do not omit the accumulator when calling `next`
|
1157
|
-
in a `reduce`/`inject` block.
|
1158
|
-
Enabled: true
|
1159
|
-
|
1160
|
-
Lint/NonLocalExitFromIterator:
|
1161
|
-
Description: 'Do not use return in iterator to cause non-local exit.'
|
1162
|
-
Enabled: true
|
1163
|
-
|
1164
|
-
Lint/ParenthesesAsGroupedExpression:
|
1165
|
-
Description: >-
|
1166
|
-
Checks for method calls with a space before the opening
|
1167
|
-
parenthesis.
|
1168
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
1169
|
-
Enabled: true
|
1170
|
-
|
1171
|
-
Lint/PercentStringArray:
|
1172
|
-
Description: >-
|
1173
|
-
Checks for unwanted commas and quotes in %w/%W literals.
|
1174
|
-
Enabled: true
|
1175
|
-
|
1176
|
-
Lint/PercentSymbolArray:
|
1177
|
-
Description: >-
|
1178
|
-
Checks for unwanted commas and colons in %i/%I literals.
|
1179
|
-
Enabled: true
|
1180
|
-
|
1181
|
-
Lint/RandOne:
|
1182
|
-
Description: >-
|
1183
|
-
Checks for `rand(1)` calls. Such calls always return `0`
|
1184
|
-
and most likely a mistake.
|
1185
|
-
Enabled: true
|
1186
|
-
|
1187
|
-
Lint/RequireParentheses:
|
1188
|
-
Description: >-
|
1189
|
-
Use parentheses in the method call to avoid confusion
|
1190
|
-
about precedence.
|
1191
|
-
Enabled: true
|
1192
|
-
|
1193
|
-
Lint/RescueException:
|
1194
|
-
Description: 'Avoid rescuing the Exception class.'
|
1195
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
|
1196
|
-
Enabled: true
|
1197
|
-
|
1198
|
-
Lint/ShadowedException:
|
1199
|
-
Description: >-
|
1200
|
-
Avoid rescuing a higher level exception
|
1201
|
-
before a lower level exception.
|
1202
|
-
Enabled: true
|
1203
|
-
|
1204
|
-
Lint/ShadowingOuterLocalVariable:
|
1205
|
-
Description: >-
|
1206
|
-
Do not use the same name as outer local variable
|
1207
|
-
for block arguments or block local variables.
|
1208
|
-
Enabled: true
|
1209
|
-
|
1210
|
-
Lint/StringConversionInInterpolation:
|
1211
|
-
Description: 'Checks for Object#to_s usage in string interpolation.'
|
1212
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
|
1213
|
-
Enabled: true
|
1214
|
-
|
1215
|
-
Lint/UnderscorePrefixedVariableName:
|
1216
|
-
Description: 'Do not use prefix `_` for a variable that is used.'
|
1217
|
-
Enabled: true
|
1218
|
-
|
1219
|
-
Lint/UnifiedInteger:
|
1220
|
-
Description: 'Use Integer instead of Fixnum or Bignum'
|
1221
|
-
Enabled: true
|
1222
|
-
|
1223
|
-
Lint/UnneededDisable:
|
1224
|
-
Description: >-
|
1225
|
-
Checks for rubocop:disable comments that can be removed.
|
1226
|
-
Note: this cop is not disabled when disabling all cops.
|
1227
|
-
It must be explicitly disabled.
|
1228
|
-
Enabled: true
|
1229
|
-
|
1230
|
-
Lint/UnneededSplatExpansion:
|
1231
|
-
Description: 'Checks for splat unnecessarily being called on literals'
|
1232
|
-
Enabled: true
|
1233
|
-
|
1234
|
-
Lint/UnusedBlockArgument:
|
1235
|
-
Description: 'Checks for unused block arguments.'
|
1236
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
1237
|
-
Enabled: true
|
1238
|
-
|
1239
|
-
Lint/UnusedMethodArgument:
|
1240
|
-
Description: 'Checks for unused method arguments.'
|
1241
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
1242
|
-
Enabled: true
|
1243
|
-
|
1244
|
-
Lint/UnreachableCode:
|
1245
|
-
Description: 'Unreachable code.'
|
1246
|
-
Enabled: true
|
1247
|
-
|
1248
|
-
Lint/UselessAccessModifier:
|
1249
|
-
Description: 'Checks for useless access modifiers.'
|
1250
|
-
Enabled: true
|
1251
|
-
ContextCreatingMethods: []
|
1252
|
-
|
1253
|
-
Lint/UselessAssignment:
|
1254
|
-
Description: 'Checks for useless assignment to a local variable.'
|
1255
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
1256
|
-
Enabled: true
|
1257
|
-
|
1258
|
-
Lint/UselessComparison:
|
1259
|
-
Description: 'Checks for comparison of something with itself.'
|
1260
|
-
Enabled: true
|
1261
|
-
|
1262
|
-
Lint/UselessElseWithoutRescue:
|
1263
|
-
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
1264
|
-
Enabled: true
|
1265
|
-
|
1266
|
-
Lint/UselessSetterCall:
|
1267
|
-
Description: 'Checks for useless setter call to a local variable.'
|
1268
|
-
Enabled: true
|
1269
|
-
|
1270
|
-
Lint/Void:
|
1271
|
-
Description: 'Possible use of operator/literal/variable in void context.'
|
1272
|
-
Enabled: true
|
1273
|
-
|
1274
|
-
##################### Performance #############################
|
1275
|
-
|
1276
|
-
Performance/Casecmp:
|
1277
|
-
Description: >-
|
1278
|
-
Use `casecmp` rather than `downcase ==`, `upcase ==`, `== downcase`, or `== upcase`..
|
1279
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringcasecmp-vs-stringdowncase---code'
|
1280
|
-
Enabled: true
|
1281
|
-
|
1282
|
-
Performance/CaseWhenSplat:
|
1283
|
-
Description: >-
|
1284
|
-
Place `when` conditions that use splat at the end
|
1285
|
-
of the list of `when` branches.
|
1286
|
-
Enabled: true
|
1287
|
-
|
1288
|
-
Performance/Count:
|
1289
|
-
Description: >-
|
1290
|
-
Use `count` instead of `select...size`, `reject...size`,
|
1291
|
-
`select...count`, `reject...count`, `select...length`,
|
1292
|
-
and `reject...length`.
|
1293
|
-
# This cop has known compatibility issues with `ActiveRecord` and other
|
1294
|
-
# frameworks. ActiveRecord's `count` ignores the block that is passed to it.
|
1295
|
-
# For more information, see the documentation in the cop itself.
|
1296
|
-
# If you understand the known risk, you can disable `SafeMode`.
|
1297
|
-
SafeMode: true
|
1298
|
-
Enabled: true
|
1299
|
-
|
1300
|
-
Performance/Detect:
|
1301
|
-
Description: >-
|
1302
|
-
Use `detect` instead of `select.first`, `find_all.first`,
|
1303
|
-
`select.last`, and `find_all.last`.
|
1304
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
|
1305
|
-
# This cop has known compatibility issues with `ActiveRecord` and other
|
1306
|
-
# frameworks. `ActiveRecord` does not implement a `detect` method and `find`
|
1307
|
-
# has its own meaning. Correcting `ActiveRecord` methods with this cop
|
1308
|
-
# should be considered unsafe.
|
1309
|
-
SafeMode: true
|
1310
|
-
Enabled: true
|
1311
|
-
|
1312
|
-
Performance/DoubleStartEndWith:
|
1313
|
-
Description: >-
|
1314
|
-
Use `str.{start,end}_with?(x, ..., y, ...)`
|
1315
|
-
instead of `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.
|
1316
|
-
Enabled: true
|
1317
|
-
|
1318
|
-
Performance/EndWith:
|
1319
|
-
Description: 'Use `end_with?` instead of a regex match anchored to the end of a string.'
|
1320
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
|
1321
|
-
Enabled: true
|
1322
|
-
|
1323
|
-
Performance/FixedSize:
|
1324
|
-
Description: 'Do not compute the size of statically sized objects except in constants'
|
1325
|
-
Enabled: true
|
1326
|
-
|
1327
|
-
Performance/FlatMap:
|
1328
|
-
Description: >-
|
1329
|
-
Use `Enumerable#flat_map`
|
1330
|
-
instead of `Enumerable#map...Array#flatten(1)`
|
1331
|
-
or `Enumberable#collect..Array#flatten(1)`
|
1332
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
|
1333
|
-
Enabled: true
|
1334
|
-
EnabledForFlattenWithoutParams: false
|
1335
|
-
# If enabled, this cop will warn about usages of
|
1336
|
-
# `flatten` being called without any parameters.
|
1337
|
-
# This can be dangerous since `flat_map` will only flatten 1 level, and
|
1338
|
-
# `flatten` without any parameters can flatten multiple levels.
|
1339
|
-
|
1340
|
-
Performance/HashEachMethods:
|
1341
|
-
Description: >-
|
1342
|
-
Use `Hash#each_key` and `Hash#each_value` instead of
|
1343
|
-
`Hash#keys.each` and `Hash#values.each`.
|
1344
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-each'
|
1345
|
-
Enabled: true
|
1346
|
-
AutoCorrect: false
|
1347
|
-
|
1348
|
-
Performance/LstripRstrip:
|
1349
|
-
Description: 'Use `strip` instead of `lstrip.rstrip`.'
|
1350
|
-
Enabled: true
|
1351
|
-
|
1352
|
-
Performance/RangeInclude:
|
1353
|
-
Description: 'Use `Range#cover?` instead of `Range#include?`.'
|
1354
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#cover-vs-include-code'
|
1355
|
-
Enabled: true
|
1356
|
-
|
1357
|
-
Performance/RedundantBlockCall:
|
1358
|
-
Description: 'Use `yield` instead of `block.call`.'
|
1359
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#proccall-vs-yield-code'
|
1360
|
-
Enabled: true
|
1361
|
-
|
1362
|
-
Performance/RedundantMatch:
|
1363
|
-
Description: >-
|
1364
|
-
Use `=~` instead of `String#match` or `Regexp#match` in a context where the
|
1365
|
-
returned `MatchData` is not needed.
|
1366
|
-
Enabled: true
|
1367
|
-
|
1368
|
-
Performance/RedundantMerge:
|
1369
|
-
Description: 'Use Hash#[]=, rather than Hash#merge! with a single key-value pair.'
|
1370
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashmerge-vs-hash-code'
|
1371
|
-
Enabled: true
|
1372
|
-
|
1373
|
-
Performance/RedundantSortBy:
|
1374
|
-
Description: 'Use `sort` instead of `sort_by { |x| x }`.'
|
1375
|
-
Enabled: true
|
1376
|
-
|
1377
|
-
Performance/ReverseEach:
|
1378
|
-
Description: 'Use `reverse_each` instead of `reverse.each`.'
|
1379
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
|
1380
|
-
Enabled: true
|
1381
|
-
|
1382
|
-
Performance/Sample:
|
1383
|
-
Description: >-
|
1384
|
-
Use `sample` instead of `shuffle.first`,
|
1385
|
-
`shuffle.last`, and `shuffle[Integer]`.
|
1386
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
|
1387
|
-
Enabled: true
|
1388
|
-
|
1389
|
-
Performance/Size:
|
1390
|
-
Description: >-
|
1391
|
-
Use `size` instead of `count` for counting
|
1392
|
-
the number of elements in `Array` and `Hash`.
|
1393
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
|
1394
|
-
Enabled: true
|
1395
|
-
|
1396
|
-
Performance/SortWithBlock:
|
1397
|
-
Description: 'Use `sort_by(&:foo)` instead of `sort_by { |a, b| a.foo <=> b.foo }`.'
|
1398
|
-
Enabled: true
|
1399
|
-
|
1400
|
-
Performance/StartWith:
|
1401
|
-
Description: 'Use `start_with?` instead of a regex match anchored to the beginning of a string.'
|
1402
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
|
1403
|
-
Enabled: true
|
1404
|
-
|
1405
|
-
Performance/StringReplacement:
|
1406
|
-
Description: >-
|
1407
|
-
Use `tr` instead of `gsub` when you are replacing the same
|
1408
|
-
number of characters. Use `delete` instead of `gsub` when
|
1409
|
-
you are deleting characters.
|
1410
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
|
1411
|
-
Enabled: true
|
1412
|
-
|
1413
|
-
Performance/TimesMap:
|
1414
|
-
Description: 'Checks for .times.map calls.'
|
1415
|
-
Enabled: true
|
1416
|
-
|
1417
|
-
##################### Rails ##################################
|
1418
|
-
|
1419
|
-
Rails/ActionFilter:
|
1420
|
-
Description: 'Enforces consistent use of action filter methods.'
|
1421
|
-
Enabled: true
|
1422
|
-
|
1423
|
-
Rails/Date:
|
1424
|
-
Description: >-
|
1425
|
-
Checks the correct usage of date aware methods,
|
1426
|
-
such as Date.today, Date.current etc.
|
1427
|
-
Enabled: true
|
1428
|
-
|
1429
|
-
Rails/Delegate:
|
1430
|
-
Description: 'Prefer delegate method for delegations.'
|
1431
|
-
Enabled: true
|
1432
|
-
|
1433
|
-
Rails/Exit:
|
1434
|
-
Description: >-
|
1435
|
-
Favor `fail`, `break`, `return`, etc. over `exit` in
|
1436
|
-
application or library code outside of Rake files to avoid
|
1437
|
-
exits during unit testing or running in production.
|
1438
|
-
Enabled: true
|
1439
|
-
|
1440
|
-
Rails/FindBy:
|
1441
|
-
Description: 'Prefer find_by over where.first.'
|
1442
|
-
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#find_by'
|
1443
|
-
Enabled: true
|
1444
|
-
|
1445
|
-
Rails/FindEach:
|
1446
|
-
Description: 'Prefer all.find_each over all.find.'
|
1447
|
-
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#find-each'
|
1448
|
-
Enabled: true
|
1449
|
-
|
1450
|
-
Rails/HasAndBelongsToMany:
|
1451
|
-
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
|
1452
|
-
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#has-many-through'
|
1453
|
-
Enabled: true
|
1454
|
-
|
1455
|
-
Rails/NotNullColumn:
|
1456
|
-
Description: 'Do not add a NOT NULL column without a default value'
|
1457
|
-
Enabled: true
|
1458
|
-
|
1459
|
-
Rails/Output:
|
1460
|
-
Description: 'Checks for calls to puts, print, etc.'
|
1461
|
-
Enabled: true
|
1462
|
-
|
1463
|
-
Rails/OutputSafety:
|
1464
|
-
Description: 'The use of `html_safe` or `raw` may be a security risk.'
|
1465
|
-
Enabled: true
|
1466
|
-
|
1467
|
-
Rails/PluralizationGrammar:
|
1468
|
-
Description: 'Checks for incorrect grammar when using methods like `3.day.ago`.'
|
1469
|
-
Enabled: true
|
1470
|
-
|
1471
|
-
Rails/ReadWriteAttribute:
|
1472
|
-
Description: >-
|
1473
|
-
Checks for read_attribute(:attr) and
|
1474
|
-
write_attribute(:attr, val).
|
1475
|
-
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#read-attribute'
|
1476
|
-
Enabled: true
|
1477
|
-
|
1478
|
-
Rails/RequestReferer:
|
1479
|
-
Description: 'Use consistent syntax for request.referer.'
|
1480
|
-
Enabled: true
|
1481
|
-
|
1482
|
-
Rails/SafeNavigation:
|
1483
|
-
Description: "Use Ruby's safe navigation operator (`&.`) instead of `try!`"
|
1484
|
-
Enabled: true
|
1485
|
-
|
1486
|
-
Rails/ScopeArgs:
|
1487
|
-
Description: 'Checks the arguments of ActiveRecord scopes.'
|
1488
|
-
Enabled: true
|
1489
|
-
|
1490
|
-
Rails/TimeZone:
|
1491
|
-
Description: 'Checks the correct usage of time zone aware methods.'
|
1492
|
-
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
|
1493
|
-
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
|
1494
|
-
Enabled: true
|
1495
|
-
|
1496
|
-
Rails/UniqBeforePluck:
|
1497
|
-
Description: 'Prefer the use of uniq or distinct before pluck.'
|
1498
|
-
Enabled: true
|
1499
|
-
|
1500
|
-
Rails/Validation:
|
1501
|
-
Description: 'Use validates :attribute, hash of validations.'
|
1502
|
-
Enabled: true
|
1503
|
-
|
1504
|
-
Security/JSONLoad:
|
1505
|
-
Description : 'Prefer usage of JSON.parse'
|
1506
|
-
Enabled: true
|