rubocop-nosolosoftware 0.8.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36dd7dd406748669e08b9f2c1d1ac6af56b69fc7bdf5e935f9e89a51b1645fd9
4
- data.tar.gz: b822e653ecfd14baecbe4166a40956dbe2b2ebcb94cb0e9c70feebb4c8766e6b
3
+ metadata.gz: 3a56547c0efe7d21679b856918547632944ae698bded671be0130792dc504bc9
4
+ data.tar.gz: 3af51a4cd0e1da30fcd07ebc4e30e58ed02a5b9bd51c9b70cb2531aa6bf92dd7
5
5
  SHA512:
6
- metadata.gz: ea6af87a67f7706395bba8f20f399291d01462c51aaeffa43d208318d59e04143858069bc2eaf18c3c5ff8b8ce5953b82de7c10271dcf44657ad4ef8e791c73d
7
- data.tar.gz: a380a542038def25b26c2f628dabc454da5de51d1c8c117da25bc7b571e24ec204c66ddf82de120b5b5f6e869cec69ea5fb4ac1c01c90f5f76daae072cb5b52f
6
+ metadata.gz: b1842c650a3c41b852b195ed69533fa1c28dc948b67a05bf7a16c70142239d4adced938adf342376be53dc854324363eb151a8b04bf49622ce0fee6f672c2adf
7
+ data.tar.gz: cd442144b1514ef18a35480105b3f89f739488214cdd97710de59e8a2a8d3bd81696f8a9d3b9783c0f533fc5c6b4d520e6eae13db3a406dc05f185c2d5984aae
@@ -5,6 +5,79 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 1.2.0 - 2020-11-13
9
+ ### Added
10
+ - Added new rules introduced in the last version.
11
+ - Lint/DuplicateBranch (1.3)
12
+ - Lint/EmptyClass (1.3)
13
+ - Style/NilLambda (1.3)
14
+
15
+ ## 1.1.0 - 2020-11-13
16
+ ### Added
17
+ - Added new rules introduced in the last version.
18
+ - Lint/NoReturnInBeginEndBlocks (1.2)
19
+ - Style/CollectionCompact (1.2)
20
+ - Style/NegatedIfElseCondition (1.2)
21
+
22
+ ### Changed
23
+ - Changed Naming/VariableNumber to start using snake_case
24
+
25
+ ## 1.0.0 - 2020-11-04
26
+ ### Added
27
+ - Added new rules introduced in the last version.
28
+ - Lint/DuplicateRegexpCharacterClassElement (1.1)
29
+ - Lint/EmptyBlock (1.1)
30
+ - Lint/ToEnumArguments (1.1)
31
+ - Lint/UnmodifiedReduceAccumulator (1.1)
32
+ - Style/ArgumentsForwarding (1.1)
33
+ - Style/DocumentDynamicEvalDefinition (1.1)
34
+ - Style/SwapValues (1.1)
35
+ - Added new rules introduced in the last version of rubocop-rspec
36
+ - RSpec/Rails/HttpStatus (2.pre)
37
+
38
+ ### Changed
39
+ - Removed shared enabled rules with rubocop 1.0
40
+ - Bump dependencies (rubocop 1.0 and rubocop-rspec 2.pre)
41
+ - Bump ruby version to use `...`
42
+ - Reordered some rules following the convention of namespace/file.
43
+
44
+
45
+ ## 0.10.0 - 2020-11-04
46
+ ### Added
47
+ - Added new rules introduced in the last version.
48
+ - Lint/HashCompareByIdentity (0.93)
49
+ - Lint/RedundantSafeNavigation (0.93)
50
+ - Style/ClassEqualityComparison (0.93)
51
+
52
+ - Added new rules introduced in the last version of rubocop-rspec
53
+ - RSpec/StubbedMock (1.44)
54
+
55
+ ### Changed
56
+ - Bump dependencies
57
+
58
+ ## 0.9.0 - 2020-09-18
59
+ ### Added
60
+ - Added new rules introduced in the last version.
61
+ - Layout/BeginEndAlignment (0.91)
62
+ - Lint/ConstantDefinitionInBlock (0.91)
63
+ - Lint/DuplicateRequire (0.90)
64
+ - Lint/EmptyFile (0.90)
65
+ - Lint/IdentityComparison (0.91)
66
+ - Lint/TrailingCommaInAttributeDeclaration (0.90)
67
+ - Lint/UselessMethodDefinition (0.90)
68
+ - Lint/UselessTimes (0.91)
69
+ - Style/CombinableLoops (0.90)
70
+ - Style/KeywordParametersOrder (0.90)
71
+ - Style/RedundantSelfAssignment (0.90)
72
+ - Style/SoleNestedConditional (0.89)
73
+ - Performance/Sum (1.8)
74
+ - Rails/AfterCommitOverride (2.8)
75
+ - Rails/SquishedSQLHeredocs (2.8)
76
+ - Rails/WhereNot (2.8)
77
+
78
+ ### Changed
79
+ - Updated all the extensions.
80
+
8
81
  ## 0.8.0 - 2020-08-07
9
82
 
10
83
  ### Added
@@ -77,6 +150,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
150
  ## [0.1.0] - 2019-12-03
78
151
 
79
152
  First version of this gem.
80
-
81
-
82
- This changelog was generated using [ChangeFu](https://github.com/javierav/changefu).
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  Common Rubocop config for all our projects.
4
4
 
5
+ Please if you are using `rubocop < 1.0` use the branch [0.x](https://github.com/nosolosoftware/rubocop-nosolosoftware/tree/0.x) and `rubocop-nosolosoftware < 1.0`.
5
6
 
6
7
  ## Installation
7
8
 
@@ -2,14 +2,6 @@
2
2
  ## https://rubocop.readthedocs.io/en/latest/cops_layout/
3
3
  #
4
4
 
5
- # https://docs.rubocop.org/en/stable/cops_layout/#layoutemptylinesaroundattributeaccessor
6
- Layout/EmptyLinesAroundAttributeAccessor:
7
- Enabled: true
8
-
9
- # https://docs.rubocop.org/en/stable/cops_layout/#layoutspacearoundmethodcalloperator
10
- Layout/SpaceAroundMethodCallOperator:
11
- Enabled: true
12
-
13
5
  # https://rubocop.readthedocs.io/en/latest/cops_layout/#layoutfirstarrayelementindentation
14
6
  Layout/FirstArrayElementIndentation:
15
7
  EnforcedStyle: consistent
@@ -2,58 +2,40 @@
2
2
  ## https://rubocop.readthedocs.io/en/latest/cops_lint/
3
3
  #
4
4
 
5
- # https://docs.rubocop.org/rubocop/cops_lint.html#lintraiseexception
6
- Lint/RaiseException:
5
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicateregexpcharacterclasselement
6
+ Lint/DuplicateRegexpCharacterClassElement:
7
7
  Enabled: true
8
8
 
9
- # https://docs.rubocop.org/rubocop/cops_lint.html#lintstructnewoverride
10
- Lint/StructNewOverride:
9
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintemptyblock
10
+ Lint/EmptyBlock:
11
11
  Enabled: true
12
+ Exclude:
13
+ - "**/spec/factories/**/*.rb"
12
14
 
13
- # https://docs.rubocop.org/rubocop/cops_lint.html#lintdeprecatedopensslconstant
14
- Lint/DeprecatedOpenSSLConstant:
15
+ # https://docs.rubocop.org/rubocop/cops_lint.html#linttoenumarguments
16
+ Lint/ToEnumArguments:
15
17
  Enabled: true
16
18
 
17
- # https://docs.rubocop.org/rubocop/cops_lint.html#lintmixedregexpcapturetypes
18
- Lint/MixedRegexpCaptureTypes:
19
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintunmodifiedreduceaccumulator
20
+ Lint/UnmodifiedReduceAccumulator:
19
21
  Enabled: true
20
22
 
21
- # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicateelsifcondition
22
- Lint/DuplicateElsifCondition:
23
+ # https://docs.rubocop.org/rubocop/cops_lint.html#linthashcomparebyidentity
24
+ Lint/HashCompareByIdentity:
23
25
  Enabled: true
24
26
 
25
- # https://docs.rubocop.org/rubocop/cops_lint.html#lintbinaryoperatorwithidenticaloperands
26
- Lint/BinaryOperatorWithIdenticalOperands:
27
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintredundantsafenavigation
28
+ Lint/RedundantSafeNavigation:
27
29
  Enabled: true
28
30
 
29
- # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicaterescueexception
30
- Lint/DuplicateRescueException:
31
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintnoreturninbeginendblocks
32
+ Lint/NoReturnInBeginEndBlocks:
31
33
  Enabled: true
32
34
 
33
- # https://docs.rubocop.org/rubocop/cops_lint.html#lintemptyconditionalbody
34
- Lint/EmptyConditionalBody:
35
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintduplicatebranch
36
+ Lint/DuplicateBranch:
35
37
  Enabled: true
36
38
 
37
- # https://docs.rubocop.org/rubocop/cops_lint.html#lintfloatcomparison
38
- Lint/FloatComparison:
39
- Enabled: true
40
-
41
- # https://docs.rubocop.org/rubocop/cops_lint.html#lintoutofrangeregexpref
42
- Lint/OutOfRangeRegexpRef:
43
- Enabled: true
44
-
45
- # https://docs.rubocop.org/rubocop/cops_lint.html#lintselfassignment
46
- Lint/SelfAssignment:
47
- Enabled: true
48
-
49
- # https://docs.rubocop.org/rubocop/cops_lint.html#linttoplevelreturnwithargument
50
- Lint/TopLevelReturnWithArgument:
51
- Enabled: true
52
-
53
- # https://docs.rubocop.org/rubocop/cops_lint.html#lintunreachableloop
54
- Lint/UnreachableLoop:
55
- Enabled: true
56
-
57
- # https://docs.rubocop.org/rubocop/cops_lint.html#lintmissingsuper
58
- Lint/MissingSuper:
39
+ # https://docs.rubocop.org/rubocop/cops_lint.html#lintemptyclass
40
+ Lint/EmptyClass:
59
41
  Enabled: true
@@ -13,3 +13,17 @@ Metrics/ClassLength:
13
13
  # https://rubocop.readthedocs.io/en/latest/cops_metrics/#metricsmethodlength
14
14
  Metrics/MethodLength:
15
15
  Enabled: false
16
+
17
+ # https://rubocop.readthedocs.io/en/latest/cops_metrics/#metricsmodulelength
18
+ Metrics/ModuleLength:
19
+ Exclude:
20
+ - "**/config/routes.rb"
21
+ - "**/spec/**/*.rb"
22
+
23
+ # https://rubocop.readthedocs.io/en/latest/cops_metrics/#blocklength
24
+ Metrics/BlockLength:
25
+ Exclude:
26
+ - "**/spec/**/*.rb"
27
+ - "**/config/environments/*.rb"
28
+ - "**/config/routes.rb"
29
+ - "**/lib/tasks/auto_annotate_models.rake"
@@ -1,3 +1,7 @@
1
1
  #
2
2
  ## https://rubocop.readthedocs.io/en/latest/cops_naming/
3
3
  #
4
+
5
+ # https://docs.rubocop.org/rubocop/cops_naming.html#namingvariablenumber
6
+ Naming/VariableNumber:
7
+ EnforcedStyle: snake_case
@@ -35,3 +35,7 @@ Performance/Squeeze:
35
35
  # https://docs.rubocop.org/rubocop-performance/1.7/cops_performance.html#performancestringinclude
36
36
  Performance/StringInclude:
37
37
  Enabled: true
38
+
39
+ # https://docs.rubocop.org/rubocop-performance/1.8/cops_performance.html#performancesum
40
+ Performance/Sum:
41
+ Enabled: true
@@ -97,3 +97,15 @@ Rails/ShortI18n:
97
97
  # https://docs.rubocop.org/rubocop-rails/cops_rails.html#railswhereexists
98
98
  Rails/WhereExists:
99
99
  Enabled: true
100
+
101
+ # https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsaftercommitoverride
102
+ Rails/AfterCommitOverride:
103
+ Enabled: true
104
+
105
+ # https://docs.rubocop.org/rubocop-rails/cops_rails.html#railssquishedsqlheredocs
106
+ Rails/SquishedSQLHeredocs:
107
+ Enabled: true
108
+
109
+ # https://docs.rubocop.org/rubocop-rails/cops_rails.html#railswherenot
110
+ Rails/WhereNot:
111
+ Enabled: true
@@ -38,12 +38,10 @@ RSpec/MultipleExpectations:
38
38
  RSpec/NestedGroups:
39
39
  Max: 5
40
40
 
41
- # https://rubocop.readthedocs.io/en/latest/cops_style/#styleblockcomments
42
- Style/BlockComments:
43
- Exclude:
44
- - "**/spec/**/*.rb"
41
+ # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecstubbedmock
42
+ RSpec/StubbedMock:
43
+ Enabled: true
45
44
 
46
- # https://rubocop.readthedocs.io/en/latest/cops_style/#styleblockdelimiters
47
- Style/BlockDelimiters:
48
- Exclude:
49
- - "**/spec/**/*.rb"
45
+ # https://docs.rubocop.org/rubocop-rspec/cops_rails.html#railshttpstatus
46
+ RSpec/Rails/HttpStatus:
47
+ EnforcedStyle: numeric
@@ -9,99 +9,54 @@ Style/AsciiComments:
9
9
  # https://rubocop.readthedocs.io/en/latest/cops_style/#styleblockdelimiters
10
10
  Style/BlockDelimiters:
11
11
  EnforcedStyle: braces_for_chaining
12
+ Exclude:
13
+ - "**/spec/**/*.rb"
12
14
 
13
15
  # https://docs.rubocop.org/rubocop/cops_style.html#styledocumentation
14
16
  Style/Documentation:
15
17
  Enabled: false
16
18
 
17
- # https://docs.rubocop.org/rubocop/cops_style.html#styleexponentialnotation
18
- Style/ExponentialNotation:
19
- Enabled: true
20
-
21
19
  # https://docs.rubocop.org/rubocop/cops_style.html#stylefrozenstringliteralcommetn
22
20
  Style/FrozenStringLiteralComment:
23
21
  Enabled: false
24
22
 
25
- # https://docs.rubocop.org/rubocop/cops_style.html#stylehasheachmethods
26
- Style/HashEachMethods:
27
- Enabled: true
28
-
29
- # https://docs.rubocop.org/rubocop/cops_style.html#stylehashtransformkeys
30
- Style/HashTransformKeys:
31
- Enabled: true
32
-
33
- # https://docs.rubocop.org/rubocop/cops_style.html#stylehashtransformvalues
34
- Style/HashTransformValues:
35
- Enabled: true
36
-
37
- # https://docs.rubocop.org/rubocop/cops_style.html#styleregexpliteral
38
- Style/RegexpLiteral:
39
- AllowInnerSlashes: true
40
-
41
- # https://docs.rubocop.org/rubocop/cops_style.html#styleslicingwithrange
42
- Style/SlicingWithRange:
43
- Enabled: true
44
-
45
23
  # https://docs.rubocop.org/rubocop/cops_style.html#styleaccessorgrouping
46
24
  Style/AccessorGrouping:
47
25
  Enabled: false
48
26
 
49
- # https://docs.rubocop.org/rubocop/cops_style.html#stylebisectedattraccessor
50
- Style/BisectedAttrAccessor:
51
- Enabled: true
52
-
53
- # https://docs.rubocop.org/rubocop/cops_style.html#styleredundantassignment
54
- Style/RedundantAssignment:
55
- Enabled: true
56
-
57
- # https://docs.rubocop.org/rubocop/cops_style.html#styleredundantfetchblock
58
- Style/RedundantFetchBlock:
59
- Enabled: true
60
-
61
- # https://docs.rubocop.org/rubocop/cops_style.html#styleredundantregexpcharacterclass
62
- Style/RedundantRegexpCharacterClass:
63
- Enabled: true
64
-
65
- # https://docs.rubocop.org/rubocop/cops_style.html#styleredundantregexpescape
66
- Style/RedundantRegexpEscape:
67
- Enabled: true
68
-
69
27
  # https://docs.rubocop.org/rubocop/cops_style.html#stylearraycoercion
70
28
  Style/ArrayCoercion:
71
29
  Enabled: true
72
30
 
73
- # https://docs.rubocop.org/rubocop/cops_style.html#stylecaselikeif
74
- Style/CaseLikeIf:
31
+ # https://docs.rubocop.org/rubocop/cops_style.html#styleargumentsforwarding
32
+ Style/ArgumentsForwarding:
75
33
  Enabled: true
76
34
 
77
- # https://docs.rubocop.org/rubocop/cops_style.html#stylehashaslastarrayitem
78
- Style/HashAsLastArrayItem:
35
+ # https://docs.rubocop.org/rubocop/cops_style.html#styledocumentdynamicevaldefinition
36
+ Style/DocumentDynamicEvalDefinition:
79
37
  Enabled: true
80
38
 
81
- # https://docs.rubocop.org/rubocop/cops_style.html#stylehashlikecase
82
- Style/HashLikeCase:
39
+ # https://docs.rubocop.org/rubocop/cops_style.html#styleswapvalues
40
+ Style/SwapValues:
83
41
  Enabled: true
84
42
 
85
- # https://docs.rubocop.org/rubocop/cops_style.html#styleredundantfileextensioninrequire
86
- Style/RedundantFileExtensionInRequire:
87
- Enabled: true
88
-
89
- # https://docs.rubocop.org/rubocop/cops_style.html#styleexplicitblockargument
90
- Style/ExplicitBlockArgument:
91
- Enabled: true
43
+ # https://rubocop.readthedocs.io/en/latest/cops_style/#styleblockcomments
44
+ Style/BlockComments:
45
+ Exclude:
46
+ - "**/spec/**/*.rb"
92
47
 
93
- # https://docs.rubocop.org/rubocop/cops_style.html#styleglobalstdstream
94
- Style/GlobalStdStream:
95
- Enabled: true
48
+ # https://docs.rubocop.org/rubocop/cops_style.html#styleregexpliteral
49
+ Style/RegexpLiteral:
50
+ AllowInnerSlashes: true
96
51
 
97
- # https://docs.rubocop.org/rubocop/cops_style.html#styleoptionalbooleanparameter
98
- Style/OptionalBooleanParameter:
52
+ # https://docs.rubocop.org/rubocop/cops_style.html#stylecollectioncompact
53
+ Style/CollectionCompact:
99
54
  Enabled: true
100
55
 
101
- # https://docs.rubocop.org/rubocop/cops_style.html#stylesingleargumentdig
102
- Style/SingleArgumentDig:
56
+ # https://docs.rubocop.org/rubocop/cops_style.html#stylenegatedifelsecondition
57
+ Style/NegatedIfElseCondition:
103
58
  Enabled: true
104
59
 
105
- # https://docs.rubocop.org/rubocop/cops_style.html#stylestringconcatenation
106
- Style/StringConcatenation:
60
+ # https://docs.rubocop.org/rubocop/cops_style.html#stylenillambda
61
+ Style/NilLambda:
107
62
  Enabled: true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-nosolosoftware
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Aranda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-07 00:00:00.000000000 Z
11
+ date: 2020-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.89'
19
+ version: '1.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.89'
26
+ version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-faker
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.7'
47
+ version: '1.8'
48
48
  type: :runtime
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: '1.7'
54
+ version: '1.8'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop-rails
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.7'
61
+ version: '2.8'
62
62
  type: :runtime
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: '2.7'
68
+ version: '2.8'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop-rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.42'
89
+ version: 2.pre
90
90
  type: :runtime
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: '1.42'
96
+ version: 2.pre
97
97
  description: ''
98
98
  email: jaranda@nosolosoftware.es
99
99
  executables: []
@@ -125,8 +125,8 @@ homepage: https://github.com/nosolosoftware/rubocop-nosolosoftware
125
125
  licenses:
126
126
  - MIT
127
127
  metadata:
128
- source_code_uri: https://github.com/nosolosoftware/rubocop-nosolosoftware/tree/v0.8.0
129
- changelog_uri: https://github.com/nosolosoftware/rubocop-nosolosoftware/blob/v0.8.0/CHANGELOG.md
128
+ source_code_uri: https://github.com/nosolosoftware/rubocop-nosolosoftware/tree/v1.2.0
129
+ changelog_uri: https://github.com/nosolosoftware/rubocop-nosolosoftware/blob/v1.2.0/CHANGELOG.md
130
130
  homepage_uri: https://github.com/nosolosoftware/rubocop-nosolosoftware
131
131
  post_install_message:
132
132
  rdoc_options:
@@ -137,7 +137,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - ">="
139
139
  - !ruby/object:Gem::Version
140
- version: 2.5.0
140
+ version: 2.7.0
141
141
  required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="