rubocop-govuk 1.0.0 → 2.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 +5 -0
- data/README.md +4 -2
- data/config/gds-ruby-styleguide.yml +4 -4
- data/config/other-lint.yml +1 -1
- data/config/other-style.yml +4 -4
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c23b647abb912a4c141e4799fe35a39917d69d1b86d4c2528476ded0985809d
|
4
|
+
data.tar.gz: 05bce0f54a903602b544a1a41ecb5abce498443996f4b992ddc2c94c111f0086
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a06387e9544b0221f2098dbc4376515cbf9ab965cec5b31215a1cd52968fffc5afeae0c3511b27f2d41218f7b771de48cf2a70e2fec814de22b90ffefb5c4d5
|
7
|
+
data.tar.gz: a47f1a2d3bf1ac8191117aa5536e360369ad0761abfc5e6b95ba52ed801f89613315babf325c4ea25264fb859053117790daf3cbac18414960dcb7f6e4120c64
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -5,14 +5,16 @@ This repository provides common RuboCop rules for use with GOV.UK Ruby projects
|
|
5
5
|
## Installation
|
6
6
|
|
7
7
|
Add `rubocop-govuk` to your Gemfile and then run `bundle install`:
|
8
|
+
|
8
9
|
```ruby
|
9
10
|
# Gemfile
|
10
11
|
gem 'rubocop-govuk'
|
11
12
|
```
|
12
13
|
|
13
14
|
Inherit rules from the gem by adding the following to your project's RuboCop config:
|
15
|
+
|
14
16
|
```yaml
|
15
|
-
# .rubocop
|
17
|
+
# .rubocop.yml
|
16
18
|
inherit_gem:
|
17
19
|
rubocop-govuk:
|
18
20
|
- config/default.yml
|
@@ -21,7 +23,7 @@ inherit_gem:
|
|
21
23
|
or if you also need Rails specific rules:
|
22
24
|
|
23
25
|
```yaml
|
24
|
-
# .rubocop
|
26
|
+
# .rubocop.yml
|
25
27
|
inherit_gem:
|
26
28
|
rubocop-govuk:
|
27
29
|
- config/default.yml
|
@@ -114,7 +114,7 @@ Layout/TrailingWhitespace:
|
|
114
114
|
Enabled: true
|
115
115
|
|
116
116
|
# Supports --auto-correct
|
117
|
-
Layout/
|
117
|
+
Layout/TrailingEmptyLines:
|
118
118
|
Description: Checks trailing blank lines and final newline.
|
119
119
|
Enabled: true
|
120
120
|
EnforcedStyle: final_newline
|
@@ -245,7 +245,7 @@ Style/TrivialAccessors:
|
|
245
245
|
ExactNameMatch: true
|
246
246
|
AllowPredicates: true
|
247
247
|
AllowDSLWriters: false
|
248
|
-
|
248
|
+
AllowedMethod:
|
249
249
|
- to_ary
|
250
250
|
- to_a
|
251
251
|
- to_c
|
@@ -282,7 +282,7 @@ Lint/RescueException:
|
|
282
282
|
## Collections
|
283
283
|
|
284
284
|
# Supports --auto-correct
|
285
|
-
Layout/
|
285
|
+
Layout/ArrayAlignment:
|
286
286
|
Description: Align the elements of an array literal if they span more than one line.
|
287
287
|
Enabled: true
|
288
288
|
|
@@ -323,7 +323,7 @@ Layout/MultilineMethodCallIndentation:
|
|
323
323
|
## Strings
|
324
324
|
|
325
325
|
# Supports --auto-correct
|
326
|
-
Lint/
|
326
|
+
Lint/RedundantStringCoercion:
|
327
327
|
Description: Checks for Object#to_s usage in string interpolation.
|
328
328
|
Enabled: true
|
329
329
|
|
data/config/other-lint.yml
CHANGED
data/config/other-style.yml
CHANGED
@@ -11,13 +11,13 @@ Style/Alias:
|
|
11
11
|
Description: 'Use alias_method instead of alias.'
|
12
12
|
Enabled: false
|
13
13
|
|
14
|
-
Layout/
|
14
|
+
Layout/HashAlignment:
|
15
15
|
Description: >-
|
16
16
|
Align the elements of a hash literal if they span more than
|
17
17
|
one line.
|
18
18
|
Enabled: false
|
19
19
|
|
20
|
-
Layout/
|
20
|
+
Layout/ParameterAlignment:
|
21
21
|
Description: >-
|
22
22
|
Align the parameters of a method call if they span more
|
23
23
|
than one line.
|
@@ -168,13 +168,13 @@ Style/IfWithSemicolon:
|
|
168
168
|
Description: 'Never use if x; .... Use the ternary operator instead.'
|
169
169
|
Enabled: false
|
170
170
|
|
171
|
-
Layout/
|
171
|
+
Layout/FirstArrayElementIndentation:
|
172
172
|
Description: >-
|
173
173
|
Checks the indentation of the first element in an array
|
174
174
|
literal.
|
175
175
|
Enabled: false
|
176
176
|
|
177
|
-
Layout/
|
177
|
+
Layout/FirstHashElementIndentation:
|
178
178
|
Description: 'Checks the indentation of the first key in a hash literal.'
|
179
179
|
Enabled: false
|
180
180
|
|
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: 2.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: 2019-11-
|
11
|
+
date: 2019-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -28,16 +28,16 @@ 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: '0.
|
33
|
+
version: '0.77'
|
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: '0.
|
40
|
+
version: '0.77'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rubocop-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|