rubocop-govuk 3.16.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +47 -0
- data/README.md +1 -1
- data/config/capybara.yml +1 -1
- data/config/default.yml +1 -0
- data/config/naming.yml +7 -0
- data/config/rails.yml +14 -1
- data/config/rspec.yml +5 -0
- data/config/style.yml +8 -0
- metadata +30 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d331e57f5c75b5cc5191e165259b4e00b292862dafa2d3c882f79783bda4b704
|
4
|
+
data.tar.gz: 21a76a6e200eac94a0aeed6177d85e901aed8d3a773df5ea2f6ce5d4e030c778
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d67c0dff23b2a2eddbc492d8f2fbccce7029ba0a1bd9d6647d3325c99f6f0bfe9fad9c2cdb8312b27279580d8229af65d2233d2480c1b7ecb19dbf37f2e37226
|
7
|
+
data.tar.gz: 8b61dbbb55cf17b9557b704b66b6614b28c85d2698e9e4e976c495dbe17bc71d3161db5da67e18923f01941670bd7e3c97510da8c70c08cb97ffdeafbb6da54c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,50 @@
|
|
1
|
+
# 4.0.0
|
2
|
+
|
3
|
+
- Update rubocop to 1.15.0
|
4
|
+
- Update rubocop-ast to 1.6.0
|
5
|
+
- Update rubocop-rails to 2.10.0
|
6
|
+
- Update rubocop-rspec to 2.3.0
|
7
|
+
|
8
|
+
# 4.0.0.pre.1
|
9
|
+
|
10
|
+
- Released as a pre-release to try surface any issues before wider rollout,
|
11
|
+
use https://github.com/alphagov/rubocop-govuk/issues/129 to record any
|
12
|
+
problems
|
13
|
+
- BREAKING: Upgraded from Rubocop 0.x to 1.x which introduces lots of new
|
14
|
+
cops
|
15
|
+
- Update rubocop to 1.10.0
|
16
|
+
- Update rubocop-ast to 1.4.0
|
17
|
+
- Update rubocop-rails to 2.9.1
|
18
|
+
- Update rubocop-rspec to 2.2.0
|
19
|
+
- Make stable dependencies (>= 1.0) less strict on patch version
|
20
|
+
- Disable `SuggestExtensions` to stop Rubocop suggesting additional
|
21
|
+
extensions at runtime
|
22
|
+
- Explicitly set target Ruby version to `>= 2.6` in gemspec
|
23
|
+
- Downgrade local Ruby version to `2.6.6` to capture lowest supported
|
24
|
+
Ruby version
|
25
|
+
- Fix namespace change of `Capybara/FeatureMethods`
|
26
|
+
- Disable `Naming/VariableNumbers`
|
27
|
+
|
28
|
+
# 4.0.0.pre.pre.1
|
29
|
+
|
30
|
+
- Mistakenly named release, same as 4.0.0.pre.1
|
31
|
+
|
32
|
+
# 3.17.2
|
33
|
+
|
34
|
+
- Rename Blacklist to ForbiddenMethods to fix rubocop-rails warnings
|
35
|
+
|
36
|
+
# 3.17.1
|
37
|
+
|
38
|
+
- Pin rubocop-ast to 0.8.0
|
39
|
+
|
40
|
+
# 3.17.0
|
41
|
+
|
42
|
+
- Enable Rails/SaveBang
|
43
|
+
- Enable Style/DateTime
|
44
|
+
- Enforce strict Time.zone.now
|
45
|
+
- Bump rubocop to 0.87.1
|
46
|
+
- Bump rubocop-rspec to 1.42.0
|
47
|
+
|
1
48
|
# 3.16.0
|
2
49
|
|
3
50
|
- Bump and lock rubocop-rails to 2.6.0
|
data/README.md
CHANGED
data/config/capybara.yml
CHANGED
data/config/default.yml
CHANGED
data/config/naming.yml
CHANGED
@@ -19,3 +19,10 @@ Naming/AccessorMethodName:
|
|
19
19
|
# repos, which would require manual intervention.
|
20
20
|
Naming/PredicateName:
|
21
21
|
Enabled: false
|
22
|
+
|
23
|
+
# This rule can cause readability issues when applied (for example
|
24
|
+
# `born_on_or_before_6_april_1935` becomes `born_on_or_before_6april1935`)
|
25
|
+
# and would require lots of amends to apply either `normalcase`
|
26
|
+
# or `snake_case` to projects. It is not auto-correctable.
|
27
|
+
Naming/VariableNumber:
|
28
|
+
Enabled: false
|
data/config/rails.yml
CHANGED
@@ -36,7 +36,7 @@ Rails/Output:
|
|
36
36
|
# no efficient alternative. Instead, we should only enable
|
37
37
|
# this Cop for methods that have a clear alternative.
|
38
38
|
Rails/SkipsModelValidations:
|
39
|
-
|
39
|
+
ForbiddenMethods:
|
40
40
|
- update_attribute
|
41
41
|
|
42
42
|
# While using has_many/through does have some advantages,
|
@@ -79,3 +79,16 @@ Rails/HasManyOrHasOneDependent:
|
|
79
79
|
# little value to many developers.
|
80
80
|
Rails/OutputSafety:
|
81
81
|
Enabled: false
|
82
|
+
|
83
|
+
# We seldom check the return value of 'update' to see if
|
84
|
+
# the operation was successful. Since we assume success, we
|
85
|
+
# should raise an exception if this is not the case.
|
86
|
+
Rails/SaveBang:
|
87
|
+
Enabled: true
|
88
|
+
|
89
|
+
# We should avoid unnecessary ambiguity between 'Time.current'
|
90
|
+
# and 'Time.zone.now', where 'Time.current' behaves differently
|
91
|
+
# depending on application config. We should always be explicit
|
92
|
+
# about whether we mean 'Time[.zone].now'.
|
93
|
+
Rails/TimeZone:
|
94
|
+
EnforcedStyle: "strict"
|
data/config/rspec.yml
CHANGED
@@ -10,6 +10,11 @@ inherit_from:
|
|
10
10
|
RSpec/ExampleLength:
|
11
11
|
Enabled: false
|
12
12
|
|
13
|
+
# We should avoid cops that are based on heuristics, since
|
14
|
+
# it's not clear what action to take to fix an issue.
|
15
|
+
RSpec/MultipleMemoizedHelpers:
|
16
|
+
Enabled: false
|
17
|
+
|
13
18
|
# We have common cases, such as rake tasks, where we do not
|
14
19
|
# use a class to the describe the test.
|
15
20
|
RSpec/DescribeClass:
|
data/config/style.yml
CHANGED
@@ -145,3 +145,11 @@ Style/SafeNavigation:
|
|
145
145
|
# https://github.com/rubocop-hq/rubocop/issues/7197
|
146
146
|
Style/FrozenStringLiteralComment:
|
147
147
|
Enabled: false
|
148
|
+
|
149
|
+
# We should only use DateTime when it's necessary to account
|
150
|
+
# for ancient calendar changes. Otherwise, the arbitrary use
|
151
|
+
# of this class in place of Date or Time is confusing.
|
152
|
+
#
|
153
|
+
# https://rubystyle.guide/#no-datetime
|
154
|
+
Style/DateTime:
|
155
|
+
Enabled: true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-govuk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Government Digital Service
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -28,30 +28,44 @@ dependencies:
|
|
28
28
|
name: rubocop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.15.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.15.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop-ast
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.6.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
54
|
+
version: 1.6.0
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rubocop-rails
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- -
|
59
|
+
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
61
|
+
version: 2.10.0
|
48
62
|
type: :runtime
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- -
|
66
|
+
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
68
|
+
version: 2.10.0
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rubocop-rake
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,16 +84,16 @@ dependencies:
|
|
70
84
|
name: rubocop-rspec
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- -
|
87
|
+
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
89
|
+
version: 2.3.0
|
76
90
|
type: :runtime
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- -
|
94
|
+
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
96
|
+
version: 2.3.0
|
83
97
|
description: Shared RuboCop rules for Ruby projects in GOV.UK
|
84
98
|
email:
|
85
99
|
- govuk-dev@digital.cabinet-office.gov.uk
|
@@ -111,14 +125,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
125
|
requirements:
|
112
126
|
- - ">="
|
113
127
|
- !ruby/object:Gem::Version
|
114
|
-
version: '
|
128
|
+
version: '2.6'
|
115
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
130
|
requirements:
|
117
131
|
- - ">="
|
118
132
|
- !ruby/object:Gem::Version
|
119
133
|
version: '0'
|
120
134
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
135
|
+
rubygems_version: 3.2.19
|
122
136
|
signing_key:
|
123
137
|
specification_version: 4
|
124
138
|
summary: RuboCop GOV.UK
|