standard-rails 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/config/base.yml +0 -12
- data/lib/standard/rails/plugin.rb +15 -1
- data/lib/standard/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21a20b533745e4b6761fc789fe128b03e4b03e9921a30f14d85087d3398ed130
|
4
|
+
data.tar.gz: 11bbf5b4c1a2c69803d9c5ca12ddf9ee2ed62f82a4843a7df22fe14f0debdad0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f40c5286a74fd60bad778ba9aeb35b9e6368edf5fc9bff23822afe8cbadcd72c4f7f5a4915481e7f98c55d094f92cdf0c4901c63e80c64091e56e6af53e81746
|
7
|
+
data.tar.gz: 20031a03010687d9e46deb65c6d28d1113e21583f1f4465b2f3f8120ab6cc07ed1c604e1965429a83afcbf99698dd9c31cf6c820f29b6410188688eddf07e751
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## [1.0.2]
|
2
|
+
|
3
|
+
- Clear warnings about cops extended by rubocop-rails [#25](https://github.com/standardrb/standard-rails/issues/25)
|
4
|
+
|
5
|
+
## [1.0.1]
|
6
|
+
|
7
|
+
- Fix errors int he initial config [#24](https://github.com/standardrb/standard-rails/pull/24)
|
8
|
+
|
1
9
|
## [1.0.0]
|
2
10
|
|
3
11
|
- Update Rubocop Rails to [v2.23.1](https://github.com/rubocop/rubocop-rails/releases/tag/v2.23.1)
|
data/Gemfile.lock
CHANGED
data/config/base.yml
CHANGED
@@ -19,15 +19,6 @@ AllCops:
|
|
19
19
|
# as the default.
|
20
20
|
TargetRailsVersion: ~
|
21
21
|
|
22
|
-
# This cop from rubocop was added to the Rubocop-Rails
|
23
|
-
# config as part of this PR:
|
24
|
-
# https://github.com/rubocop/rubocop-rails/pull/1014
|
25
|
-
# in order to support some Rails-specific methods. At the
|
26
|
-
# time of writing, it's disabled in Standard, so it's
|
27
|
-
# disabled here.
|
28
|
-
Lint/RedundantSafeNavigation:
|
29
|
-
Enabled: false
|
30
|
-
|
31
22
|
Lint/SafeNavigationChain:
|
32
23
|
Enabled: true
|
33
24
|
AllowedMethods:
|
@@ -427,6 +418,3 @@ Rails/WhereNot:
|
|
427
418
|
|
428
419
|
Rails/WhereNotWithMultipleConditions:
|
429
420
|
Enabled: false
|
430
|
-
|
431
|
-
Style/InvertibleUnlessCondition:
|
432
|
-
Enabled: false
|
@@ -27,7 +27,9 @@ module Standard
|
|
27
27
|
LintRoller::Rules.new(
|
28
28
|
type: :object,
|
29
29
|
config_format: :rubocop,
|
30
|
-
value:
|
30
|
+
value: without_extended_rule_configs(
|
31
|
+
rules_with_config_applied
|
32
|
+
)
|
31
33
|
)
|
32
34
|
end
|
33
35
|
|
@@ -44,6 +46,18 @@ module Standard
|
|
44
46
|
)
|
45
47
|
end
|
46
48
|
|
49
|
+
# rubocop-rails adds additional options to a couple out-of-the-box cops
|
50
|
+
# but Standard (1) doesn't enable these to begin with and (2) doesn't
|
51
|
+
# allow rules' configs to be edited once they are defined, so we'll just
|
52
|
+
# remove them here
|
53
|
+
#
|
54
|
+
# See: https://github.com/standardrb/standard-rails/issues/25#issuecomment-1881127173
|
55
|
+
def without_extended_rule_configs(rules)
|
56
|
+
rules.reject { |(name,_)|
|
57
|
+
["Style/InvertibleUnlessCondition", "Lint/SafeNavigationChain"].include?(name)
|
58
|
+
}.to_h
|
59
|
+
end
|
60
|
+
|
47
61
|
# This is not fantastic.
|
48
62
|
#
|
49
63
|
# When you `require "rubocop-rails"`, it will not only load the cops,
|