rubocop-rubomatic 1.0.0 → 1.1.0.pre.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +24 -0
- data/config/lint.yml +17 -2
- data/config/performance.yml +1 -0
- data/config/style.yml +51 -20
- data/lib/rubocop/rubomatic/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c643ed32a534b05142ba6221d37e5ffba3a6a0520b391b959b7405d8ee04cf43
|
4
|
+
data.tar.gz: e55831c6f2c190a03868bdca978f77a9b6aba52739a6eb4c68ea28686f929dfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4210fa8af385a4c87f0f02137d3a616d43a35393c486c9cfc43eee9cc4b1303916b02aa60967a0b376d0087cf798ae2ba41fa604aa19f7670a2cab66d8824300
|
7
|
+
data.tar.gz: 1f79684ee827d2370d45c07e764e9fa560e731e1ff3958d76121d0c020199eb9e5ac1845157ff9c7462300ae69886a6690edd50789830329e3a702ca1bf36323
|
data/CHANGELOG.adoc
CHANGED
@@ -1,3 +1,27 @@
|
|
1
|
+
== 1.1.0
|
2
|
+
|
3
|
+
=== Cops
|
4
|
+
|
5
|
+
* `Lint/DuplicateMatchPattern`
|
6
|
+
* `Lint/MixedCaseRange`
|
7
|
+
* `Lint/RedundantRegexpQuantifiers`
|
8
|
+
* `Performance/RedundantEqualityComparisonBlock/AllowRegexpMatch` added
|
9
|
+
* `Style/ExactRegexpMatch`
|
10
|
+
* `Style/MethodCallWithArgsParentheses/Exclude` added `Gemfile`
|
11
|
+
* `Style/MultipleComparison/ComparisonsThreshold` added with `2`
|
12
|
+
* `Style/RedundantArrayConstructor`
|
13
|
+
* `Style/RedundantCurrentDirectoryInPath`
|
14
|
+
* `Style/RedundantFilterChain`
|
15
|
+
* `Style/RedundantRegexpArgument`
|
16
|
+
* `Style/RedundantRegexpConstructor`
|
17
|
+
* `Style/ReturnNilInPredicateMethodDefinition`
|
18
|
+
* `Style/YAMLFileRead`
|
19
|
+
|
20
|
+
=== Dependencies
|
21
|
+
|
22
|
+
* `rubocop@1.53.0`
|
23
|
+
* `rubocop-performance@1.18.0`
|
24
|
+
|
1
25
|
== 1.0.0
|
2
26
|
|
3
27
|
* Initial merging migration
|
data/config/lint.yml
CHANGED
@@ -227,6 +227,11 @@ Lint/DuplicateMagicComment:
|
|
227
227
|
Enabled: true
|
228
228
|
VersionAdded: '1.37'
|
229
229
|
|
230
|
+
Lint/DuplicateMatchPattern:
|
231
|
+
Description: Do not repeat patterns in `in` keywords.
|
232
|
+
Enabled: true
|
233
|
+
VersionAdded: '1.50'
|
234
|
+
|
230
235
|
Lint/DuplicateMethods:
|
231
236
|
Description: 'Check for duplicate method definitions.'
|
232
237
|
Enabled: true
|
@@ -462,6 +467,13 @@ Lint/MissingSuper:
|
|
462
467
|
VersionAdded: '0.89'
|
463
468
|
VersionChanged: '1.4'
|
464
469
|
|
470
|
+
Lint/MixedCaseRange:
|
471
|
+
Description: Checks for mixed-case character ranges since they include likely unintended
|
472
|
+
characters.
|
473
|
+
Enabled: true
|
474
|
+
SafeAutoCorrect: false
|
475
|
+
VersionAdded: '1.53'
|
476
|
+
|
465
477
|
Lint/MixedRegexpCaptureTypes:
|
466
478
|
Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
|
467
479
|
Enabled: true
|
@@ -631,6 +643,11 @@ Lint/RedundantDirGlobSort:
|
|
631
643
|
VersionChanged: '1.26'
|
632
644
|
SafeAutoCorrect: false
|
633
645
|
|
646
|
+
Lint/RedundantRegexpQuantifiers:
|
647
|
+
Description: Checks for redundant quantifiers in Regexps.
|
648
|
+
Enabled: true
|
649
|
+
VersionAdded: '1.53'
|
650
|
+
|
634
651
|
Lint/RedundantRequireStatement:
|
635
652
|
Description: 'Checks for unnecessary `require` statement.'
|
636
653
|
Enabled: true
|
@@ -956,12 +973,10 @@ Lint/UselessMethodDefinition:
|
|
956
973
|
VersionChanged: '0.91'
|
957
974
|
Safe: false
|
958
975
|
|
959
|
-
<% if RuboCop::Version.version.to_f >= 1.43 %>
|
960
976
|
Lint/UselessRescue:
|
961
977
|
Description: 'Checks for useless `rescue`s, which only reraise rescued exceptions.'
|
962
978
|
Enabled: true
|
963
979
|
VersionAdded: '1.43'
|
964
|
-
<% end %>
|
965
980
|
|
966
981
|
Lint/UselessRuby2Keywords:
|
967
982
|
Description: 'Finds unnecessary uses of `ruby2_keywords`.'
|
data/config/performance.yml
CHANGED
@@ -147,6 +147,7 @@ Performance/RedundantEqualityComparisonBlock:
|
|
147
147
|
Enabled: true
|
148
148
|
Safe: false
|
149
149
|
VersionAdded: '1.10'
|
150
|
+
AllowRegexpMatch: true
|
150
151
|
|
151
152
|
Performance/RedundantMatch:
|
152
153
|
Description: Use `=~` instead of `String#match` or `Regexp#match` in a context where
|
data/config/style.yml
CHANGED
@@ -62,12 +62,10 @@ Style/ArrayCoercion:
|
|
62
62
|
Enabled: true
|
63
63
|
VersionAdded: '0.88'
|
64
64
|
|
65
|
-
<% if RuboCop::Version.document_version.to_f >= 1.40 %>
|
66
65
|
Style/ArrayIntersect:
|
67
66
|
Description: 'Use `array1.intersect?(array2)` instead of `(array1 & array2).any?`.'
|
68
67
|
Enabled: true
|
69
68
|
VersionAdded: '1.40'
|
70
|
-
<% end %>
|
71
69
|
|
72
70
|
Style/ArrayJoin:
|
73
71
|
Description: 'Use Array#join instead of Array#*.'
|
@@ -447,20 +445,16 @@ Style/CommentedKeyword:
|
|
447
445
|
VersionAdded: '0.51'
|
448
446
|
VersionChanged: '1.19'
|
449
447
|
|
450
|
-
<% if RuboCop::Version.document_version.to_f >= 1.44 %>
|
451
448
|
Style/ComparableClamp:
|
452
449
|
Description: 'Enforces the use of `Comparable#clamp` instead of comparison by minimum and maximum.'
|
453
450
|
Enabled: true
|
454
451
|
VersionAdded: '1.44'
|
455
|
-
<% end %>
|
456
452
|
|
457
|
-
<% if RuboCop::Version.document_version.to_f >= 1.41 %>
|
458
453
|
Style/ConcatArrayLiterals:
|
459
454
|
Description: 'Enforces the use of `Array#push(item)` instead of `Array#concat([item])` to avoid redundant array literals.'
|
460
455
|
Enabled: true
|
461
456
|
Safe: false
|
462
457
|
VersionAdded: '1.41'
|
463
|
-
<% end %>
|
464
458
|
|
465
459
|
Style/ConditionalAssignment:
|
466
460
|
Description: >-
|
@@ -545,13 +539,11 @@ Style/Dir:
|
|
545
539
|
Enabled: true
|
546
540
|
VersionAdded: '0.50'
|
547
541
|
|
548
|
-
<% if RuboCop::Version.document_version.to_f >= 1.48 %>
|
549
542
|
Style/DirEmpty:
|
550
543
|
Description: >-
|
551
544
|
Prefer to use `Dir.empty?('path/to/dir')` when checking if a directory is empty.
|
552
545
|
Enabled: true
|
553
546
|
VersionAdded: '1.48'
|
554
|
-
<% end %>
|
555
547
|
|
556
548
|
Style/DisableCopsWithinSourceCodeDirective:
|
557
549
|
Severity: info # Or warning
|
@@ -715,6 +707,11 @@ Style/EvenOdd:
|
|
715
707
|
VersionAdded: '0.12'
|
716
708
|
VersionChanged: '0.29'
|
717
709
|
|
710
|
+
Style/ExactRegexpMatch:
|
711
|
+
Description: Checks for exact regexp match inside Regexp literals.
|
712
|
+
Enabled: true
|
713
|
+
VersionAdded: '1.51'
|
714
|
+
|
718
715
|
Style/ExpandPathArguments:
|
719
716
|
Description: "Use `expand_path(__dir__)` instead of `expand_path('..', __FILE__)`."
|
720
717
|
Enabled: true
|
@@ -750,13 +747,11 @@ Style/FetchEnvVar:
|
|
750
747
|
# Environment variables to be excluded from the inspection.
|
751
748
|
AllowedVars: [ ]
|
752
749
|
|
753
|
-
<% if RuboCop::Version.document_version.to_f >= 1.48 %>
|
754
750
|
Style/FileEmpty:
|
755
751
|
Description: >-
|
756
752
|
Prefer to use `File.empty?('path/to/file')` when checking if a file is empty.
|
757
753
|
Enabled: true
|
758
754
|
VersionAdded: '1.48'
|
759
|
-
<% end %>
|
760
755
|
|
761
756
|
Style/FileRead:
|
762
757
|
Description: 'Favor `File.(bin)read` convenience methods.'
|
@@ -1080,7 +1075,6 @@ Style/InverseMethods:
|
|
1080
1075
|
:select: :reject
|
1081
1076
|
:select!: :reject!
|
1082
1077
|
|
1083
|
-
<% if RuboCop::Version.document_version.to_f >= 1.44 %>
|
1084
1078
|
Style/InvertibleUnlessCondition:
|
1085
1079
|
Description: 'Favor `if` with inverted condition over `unless`.'
|
1086
1080
|
Enabled: true
|
@@ -1107,7 +1101,6 @@ Style/InvertibleUnlessCondition:
|
|
1107
1101
|
:exclude?: :include?
|
1108
1102
|
# :one?: :many?
|
1109
1103
|
# :many?: :one?
|
1110
|
-
<% end %>
|
1111
1104
|
|
1112
1105
|
Style/IpAddresses:
|
1113
1106
|
Description: "Don't include literal IP addresses in code."
|
@@ -1220,6 +1213,7 @@ Style/MethodCallWithArgsParentheses:
|
|
1220
1213
|
- omit_parentheses
|
1221
1214
|
Exclude:
|
1222
1215
|
- 'db/migrate/*'
|
1216
|
+
- 'Gemfile'
|
1223
1217
|
|
1224
1218
|
Style/MethodCallWithoutArgsParentheses:
|
1225
1219
|
Description: 'Do not use parentheses for method calls with no arguments.'
|
@@ -1389,6 +1383,7 @@ Style/MultipleComparison:
|
|
1389
1383
|
VersionAdded: '0.49'
|
1390
1384
|
VersionChanged: '1.1'
|
1391
1385
|
AllowMethodComparison: true
|
1386
|
+
ComparisonsThreshold: 2
|
1392
1387
|
|
1393
1388
|
Style/MutableConstant:
|
1394
1389
|
Description: 'Do not assign mutable objects to constants.'
|
@@ -1807,6 +1802,11 @@ Style/RedundantArgument:
|
|
1807
1802
|
chomp:
|
1808
1803
|
chomp!:
|
1809
1804
|
|
1805
|
+
Style/RedundantArrayConstructor:
|
1806
|
+
Description: Checks for the instantiation of array using redundant `Array` constructor.
|
1807
|
+
Enabled: true
|
1808
|
+
VersionAdded: '1.52'
|
1809
|
+
|
1810
1810
|
Style/RedundantAssignment:
|
1811
1811
|
Description: 'Checks for redundant assignment before returning.'
|
1812
1812
|
Enabled: true
|
@@ -1834,19 +1834,20 @@ Style/RedundantConditional:
|
|
1834
1834
|
Enabled: true
|
1835
1835
|
VersionAdded: '0.50'
|
1836
1836
|
|
1837
|
-
<% if RuboCop::Version.document_version.to_f >= 1.40 %>
|
1838
1837
|
Style/RedundantConstantBase:
|
1839
1838
|
Description: Avoid redundant `::` prefix on constant.
|
1840
1839
|
Enabled: true
|
1841
1840
|
VersionAdded: '1.40'
|
1842
|
-
<% end %>
|
1843
1841
|
|
1844
|
-
|
1842
|
+
Style/RedundantCurrentDirectoryInPath:
|
1843
|
+
Description: Checks for uses a redundant current directory in path.
|
1844
|
+
Enabled: true
|
1845
|
+
VersionAdded: '1.53'
|
1846
|
+
|
1845
1847
|
Style/RedundantDoubleSplatHashBraces:
|
1846
1848
|
Description: 'Checks for redundant uses of double splat hash braces.'
|
1847
1849
|
Enabled: true
|
1848
1850
|
VersionAdded: '1.41'
|
1849
|
-
<% end %>
|
1850
1851
|
|
1851
1852
|
Style/RedundantEach:
|
1852
1853
|
Description: 'Checks for redundant `each`.'
|
@@ -1882,18 +1883,23 @@ Style/RedundantFileExtensionInRequire:
|
|
1882
1883
|
Enabled: true
|
1883
1884
|
VersionAdded: '0.88'
|
1884
1885
|
|
1886
|
+
Style/RedundantFilterChain:
|
1887
|
+
Description: Identifies usages of `any?`, `empty?`, `none?` or `one?` predicate methods
|
1888
|
+
chained to `select`/`filter`/`find_all` and change them to use predicate method
|
1889
|
+
instead.
|
1890
|
+
Enabled: true
|
1891
|
+
VersionAdded: '1.52'
|
1892
|
+
|
1885
1893
|
Style/RedundantFreeze:
|
1886
1894
|
Description: "Checks usages of Object#freeze on immutable objects."
|
1887
1895
|
Enabled: true
|
1888
1896
|
VersionAdded: '0.34'
|
1889
1897
|
VersionChanged: '0.66'
|
1890
1898
|
|
1891
|
-
<% if RuboCop::Version.document_version.to_f >= 1.45 %>
|
1892
1899
|
Style/RedundantHeredocDelimiterQuotes:
|
1893
1900
|
Description: 'Checks for redundant heredoc delimiter quotes.'
|
1894
1901
|
Enabled: true
|
1895
1902
|
VersionAdded: '1.45'
|
1896
|
-
<% end %>
|
1897
1903
|
|
1898
1904
|
Style/RedundantInitialize:
|
1899
1905
|
Description: 'Checks for redundant `initialize` methods.'
|
@@ -1926,11 +1932,23 @@ Style/RedundantPercentQ:
|
|
1926
1932
|
Enabled: true
|
1927
1933
|
VersionAdded: '0.76'
|
1928
1934
|
|
1935
|
+
Style/RedundantRegexpArgument:
|
1936
|
+
Description: Identifies places where argument can be replaced from a deterministic
|
1937
|
+
regexp to a string.
|
1938
|
+
Enabled: true
|
1939
|
+
VersionAdded: '1.53'
|
1940
|
+
|
1929
1941
|
Style/RedundantRegexpCharacterClass:
|
1930
1942
|
Description: 'Checks for unnecessary single-element Regexp character classes.'
|
1931
1943
|
Enabled: true
|
1932
1944
|
VersionAdded: '0.85'
|
1933
1945
|
|
1946
|
+
Style/RedundantRegexpConstructor:
|
1947
|
+
Description: Checks for the instantiation of regexp using redundant `Regexp.new` or
|
1948
|
+
`Regexp.compile`.
|
1949
|
+
Enabled: true
|
1950
|
+
VersionAdded: '1.52'
|
1951
|
+
|
1934
1952
|
Style/RedundantRegexpEscape:
|
1935
1953
|
Description: 'Checks for redundant escapes in Regexps.'
|
1936
1954
|
Enabled: true
|
@@ -2000,13 +2018,11 @@ Style/RegexpLiteral:
|
|
2000
2018
|
# are found in the regexp string.
|
2001
2019
|
AllowInnerSlashes: false
|
2002
2020
|
|
2003
|
-
<% if RuboCop::Version.document_version.to_f >= 1.40 %>
|
2004
2021
|
Style/RequireOrder:
|
2005
2022
|
Description: Sort `require` and `require_relative` in alphabetical order.
|
2006
2023
|
Enabled: true
|
2007
2024
|
SafeAutoCorrect: false
|
2008
2025
|
VersionAdded: '1.40'
|
2009
|
-
<% end %>
|
2010
2026
|
|
2011
2027
|
Style/RescueModifier:
|
2012
2028
|
Description: 'Avoid using rescue in its modifier form.'
|
@@ -2035,6 +2051,15 @@ Style/ReturnNil:
|
|
2035
2051
|
- return_nil
|
2036
2052
|
VersionAdded: '0.50'
|
2037
2053
|
|
2054
|
+
Style/ReturnNilInPredicateMethodDefinition:
|
2055
|
+
Description: Checks if uses of `return` or `return nil` in predicate method definition.
|
2056
|
+
StyleGuide: "#bool-methods-qmark"
|
2057
|
+
Enabled: true
|
2058
|
+
SafeAutoCorrect: false
|
2059
|
+
AllowedMethods: [ ]
|
2060
|
+
AllowedPatterns: [ ]
|
2061
|
+
VersionAdded: '1.53'
|
2062
|
+
|
2038
2063
|
Style/SafeNavigation:
|
2039
2064
|
Description: >-
|
2040
2065
|
Transforms usages of a method call safeguarded by
|
@@ -2519,6 +2544,12 @@ Style/WordArray:
|
|
2519
2544
|
# The regular expression `WordRegex` decides what is considered a word.
|
2520
2545
|
WordRegex: !ruby/regexp '/\A(?:\p{Word}|\p{Word}-\p{Word}|\n|\t)+\z/'
|
2521
2546
|
|
2547
|
+
Style/YAMLFileRead:
|
2548
|
+
Description: Checks for the use of `YAML.load`, `YAML.safe_load`, and `YAML.parse`
|
2549
|
+
with `File.read` argument.
|
2550
|
+
Enabled: true
|
2551
|
+
VersionAdded: '1.53'
|
2552
|
+
|
2522
2553
|
Style/YodaCondition:
|
2523
2554
|
Description: 'Forbid or enforce yoda conditions.'
|
2524
2555
|
Reference: 'https://en.wikipedia.org/wiki/Yoda_conditions'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-rubomatic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.1.0.pre.rc.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brands Insurance
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.53.0
|
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: 1.
|
26
|
+
version: 1.53.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubocop-performance
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.18.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.18.0
|
41
41
|
description:
|
42
42
|
email:
|
43
43
|
- documents@brandsinsurance.com
|
@@ -97,9 +97,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
97
|
version: 3.0.1
|
98
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - "
|
100
|
+
- - ">"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
102
|
+
version: 1.3.1
|
103
103
|
requirements: []
|
104
104
|
rubygems_version: 3.2.15
|
105
105
|
signing_key:
|