rubocop-govuk 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/config/default.yml +0 -1
- data/config/layout.yml +39 -16
- data/config/metrics.yml +3 -1
- data/config/naming.yml +10 -15
- data/config/rails.yml +0 -12
- metadata +3 -4
- data/config/lint.yml +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab10ddfc89214d7fae46f59e6c4b562938daa350796eb48e2f78ab56fcd7df7c
|
4
|
+
data.tar.gz: 574eef536a366973c7c7f8fd36d3a824ad034056957730247345899323a21f21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f11edcb99e6acaf178b3daaacedccd66764e8b660a824e12016057b5877cbd11249e41e08a7697ee5610fc8fb09a8ffe3834d748d6930bf4472294aa9633ff5c
|
7
|
+
data.tar.gz: 12cf45d1bb91ad44bf5cdc42e7a8d223a062e8ecf2156273d0c6bf298ff741747d146af837882dbf9700f321fb82a8b3b603d6fa1a39378ca5018230177a70e0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# 3.8.0
|
2
|
+
|
3
|
+
* Enable check for flip-flops (#55)
|
4
|
+
* Enable Layout/FirstArrayElementIndentation (#56)
|
5
|
+
* Enable Layout/FirstHashElementIndentation (#56)
|
6
|
+
* Enable Naming/AsciiIdentifiers (#58)
|
7
|
+
* Enable Naming/FileName (#58)
|
8
|
+
* Enable Rails/ActionFilter (#59)
|
9
|
+
* Enable Rails/ScopeArgs (#59)
|
10
|
+
|
1
11
|
# 3.7.0
|
2
12
|
|
3
13
|
* Turn a load of Cops back on (#52)
|
data/config/default.yml
CHANGED
data/config/layout.yml
CHANGED
@@ -15,8 +15,17 @@ Layout/LineLength:
|
|
15
15
|
Description: Limit lines to 80 characters.
|
16
16
|
Enabled: false
|
17
17
|
|
18
|
-
#
|
19
|
-
#
|
18
|
+
# We have two styles of method call in our apps:
|
19
|
+
#
|
20
|
+
# SomeClass.first_method_call_on_same_line
|
21
|
+
# .other_method_call
|
22
|
+
#
|
23
|
+
# a_particularly_long_first_method_call
|
24
|
+
# .subsequent_method_call
|
25
|
+
#
|
26
|
+
# Any setting of this Cop would cause odd alignment
|
27
|
+
# for one of these styles. Since there isn't a Cop to
|
28
|
+
# set a preferred style, we should disable this one.
|
20
29
|
Layout/MultilineMethodCallIndentation:
|
21
30
|
Enabled: false
|
22
31
|
|
@@ -28,24 +37,38 @@ Layout/AccessModifierIndentation:
|
|
28
37
|
Enabled: true
|
29
38
|
EnforcedStyle: outdent
|
30
39
|
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
40
|
+
# Our predominant style of writing multiline arrays is:
|
41
|
+
#
|
42
|
+
# my_array = [
|
43
|
+
# element_1,
|
44
|
+
# element_2,
|
45
|
+
# ]
|
46
|
+
#
|
47
|
+
# even_in_a_method_call([
|
48
|
+
# element_1,
|
49
|
+
# element_2,
|
50
|
+
# ])
|
34
51
|
Layout/FirstArrayElementIndentation:
|
35
|
-
|
36
|
-
Checks the indentation of the first element in an array
|
37
|
-
literal.
|
38
|
-
Enabled: false
|
52
|
+
EnforcedStyle: consistent
|
39
53
|
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
54
|
+
# Our predominant style of writing multiline hashes is:
|
55
|
+
#
|
56
|
+
# my_hash = {
|
57
|
+
# key_1: value_1,
|
58
|
+
# key_2: value_2,
|
59
|
+
# }
|
60
|
+
#
|
61
|
+
# even_in_a_method_call({
|
62
|
+
# key_1: value_1,
|
63
|
+
# key_2: value_2,
|
64
|
+
# })
|
43
65
|
Layout/FirstHashElementIndentation:
|
44
|
-
|
45
|
-
Enabled: false
|
66
|
+
EnforcedStyle: consistent
|
46
67
|
|
68
|
+
# Our predominant style of writing multiline operations is
|
69
|
+
# to indent the subsequent lines. This helps to prevent
|
70
|
+
# misreading the next line as a new/separate statement.
|
71
|
+
#
|
47
72
|
# Introduced in: 9b2a744ab119d7797aaf423abcec914360f4208e
|
48
|
-
# "More lenient on multi-line operations"
|
49
|
-
# TODO: unclear why this is here!
|
50
73
|
Layout/MultilineOperationIndentation:
|
51
74
|
EnforcedStyle: indented
|
data/config/metrics.yml
CHANGED
@@ -46,7 +46,9 @@ Metrics/PerceivedComplexity:
|
|
46
46
|
Enabled: false
|
47
47
|
|
48
48
|
# Introduced in: c69a7eb3af955d6c4c0cf0c3cec8e9f330c74429
|
49
|
-
#
|
49
|
+
#
|
50
|
+
# We should avoid cops that are based on heuristics, since
|
51
|
+
# it's not clear what action to take to fix an issue.
|
50
52
|
Metrics/BlockNesting:
|
51
53
|
Description: 'Avoid excessive block nesting'
|
52
54
|
Enabled: false
|
data/config/naming.yml
CHANGED
@@ -1,21 +1,16 @@
|
|
1
|
+
# Conflicts with the original GDS styleguide
|
2
|
+
#
|
3
|
+
# While this may conflict with the original GDS styleguide, there
|
4
|
+
# are times where we wish to call a method that "sets" something.
|
5
|
+
#
|
6
|
+
# def set_political_and_government(edition)
|
7
|
+
#
|
8
|
+
# The original styleguide only accounts for a specific kind of "set"
|
9
|
+
# operation, where the argument is the value being assigned.
|
10
|
+
#
|
1
11
|
# Introduced in: c69a7eb3af955d6c4c0cf0c3cec8e9f330c74429
|
2
|
-
# TODO: conflicts with the original GDS styleguide
|
3
|
-
# "Avoid get/set method names"
|
4
12
|
# https://github.com/alphagov/styleguides/blob/6395a10d41c3938f4c147cda443fd83f854c3e7a/ruby.md#naming
|
5
13
|
Naming/AccessorMethodName:
|
6
|
-
Description: Check the naming of accessor methods for get_/set_.
|
7
|
-
Enabled: false
|
8
|
-
|
9
|
-
# Introduced in: c69a7eb3af955d6c4c0cf0c3cec8e9f330c74429
|
10
|
-
# TODO: unclear why this is here!
|
11
|
-
Naming/AsciiIdentifiers:
|
12
|
-
Description: 'Use only ascii symbols in identifiers.'
|
13
|
-
Enabled: false
|
14
|
-
|
15
|
-
# Introduced in: c69a7eb3af955d6c4c0cf0c3cec8e9f330c74429
|
16
|
-
# TODO: unclear why this is here!
|
17
|
-
Naming/FileName:
|
18
|
-
Description: 'Use snake_case for source file names.'
|
19
14
|
Enabled: false
|
20
15
|
|
21
16
|
# Introduced in: c69a7eb3af955d6c4c0cf0c3cec8e9f330c74429
|
data/config/rails.yml
CHANGED
@@ -13,12 +13,6 @@ AllCops:
|
|
13
13
|
Rails:
|
14
14
|
Enabled: true
|
15
15
|
|
16
|
-
# Introduced in: c69a7eb3af955d6c4c0cf0c3cec8e9f330c74429
|
17
|
-
# TODO: unclear why this is here!
|
18
|
-
Rails/ActionFilter:
|
19
|
-
Description: 'Enforces consistent use of action filter methods.'
|
20
|
-
Enabled: false
|
21
|
-
|
22
16
|
# Introduced in: c69a7eb3af955d6c4c0cf0c3cec8e9f330c74429
|
23
17
|
# TODO: unclear why this is here!
|
24
18
|
Rails/HasAndBelongsToMany:
|
@@ -31,12 +25,6 @@ Rails/Output:
|
|
31
25
|
Description: 'Checks for calls to puts, print, etc.'
|
32
26
|
Enabled: false
|
33
27
|
|
34
|
-
# Introduced in: c69a7eb3af955d6c4c0cf0c3cec8e9f330c74429
|
35
|
-
# TODO: unclear why this is here!
|
36
|
-
Rails/ScopeArgs:
|
37
|
-
Description: 'Checks the arguments of ActiveRecord scopes.'
|
38
|
-
Enabled: false
|
39
|
-
|
40
28
|
# Introduced in: 91d7bf4895db12727582ad7bf47bdcb20ab178f7
|
41
29
|
# TODO: unclear (in any real detail) why this is here!
|
42
30
|
Rails/SkipsModelValidations:
|
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: 3.
|
4
|
+
version: 3.8.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: 2020-
|
11
|
+
date: 2020-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -93,7 +93,6 @@ files:
|
|
93
93
|
- config/bundler.yml
|
94
94
|
- config/default.yml
|
95
95
|
- config/layout.yml
|
96
|
-
- config/lint.yml
|
97
96
|
- config/metrics.yml
|
98
97
|
- config/naming.yml
|
99
98
|
- config/rails.yml
|
@@ -118,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
117
|
- !ruby/object:Gem::Version
|
119
118
|
version: '0'
|
120
119
|
requirements: []
|
121
|
-
rubygems_version: 3.1.
|
120
|
+
rubygems_version: 3.1.3
|
122
121
|
signing_key:
|
123
122
|
specification_version: 4
|
124
123
|
summary: RuboCop GOV.UK
|