rubocop-govuk 1.0.0 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64fec5146e2d9675100ef4f3e9e2e20662b9fe142c3543ba944b093a22567e5c
4
- data.tar.gz: e3b797ff3bda459208fab3db93f3cdb852cbbe694afdd7ef75df89cf290e1cdc
3
+ metadata.gz: 4947e41fd12635ee3de075acde23d364be021367110d0b1952773d9f29953dd2
4
+ data.tar.gz: 00f07260888c5f71ed363e51f7c6f21c8e7f06108996670920a591ebd8f373b1
5
5
  SHA512:
6
- metadata.gz: 1f31c42621eb74cea67290c161c8febe47f85adffa4a6caa392290d8a48b02f2c0113e992aa1e97aca3335d8a1aae2ed97b2d133622c0e3215238bf988fa0dc2
7
- data.tar.gz: 751fdab0163a353a6c65233c9a752df7b011fb5e551caf48a0e848013050fbcd343ba263fda5de2667fb4eaabe0d1910b06cadb55758020e7248a5f67af47f4e
6
+ metadata.gz: e4b1c8d275050bf3e29f0e0ecbaf78d9636ee9491f25c2942b28f825e7c1d7fd7b9ddb51b7efc14ddf70098fb347279b633a94fbbb7176c58ac6377bff678271
7
+ data.tar.gz: 575aa067b5cd319f1c62fe8296b3473ad017ca4b060ee5ee684aa9842793ca459d37e01596ef33056af37179e9b8e72af5100a86d353e2b5d04a92749b0f7de7
@@ -1,3 +1,29 @@
1
+ # 3.3.0
2
+
3
+ * Exclude Rails migrations from linting checks (#25)
4
+
5
+ # 3.2.0
6
+
7
+ * Configure new cops about hash styles (#24)
8
+ * Exclude `tmp` directory from linting checks (#22)
9
+
10
+ # 3.1.0
11
+
12
+ * Fix deprecation warning for AllCops/Excludes => AllCops/Exclude (#17)
13
+ * Exclude `config.ru` from linter checks (#18)
14
+
15
+ # 3.0.0
16
+
17
+ * Update Rubocop to 0.80.1
18
+ * This deletes the Style/BracesAroundHashParameters cop for future
19
+ Ruby 3 compatibility.
20
+ * Exclude `bin` directory and `db/schema.rb` from linter checks (#14)
21
+
22
+ # 2.0.0
23
+
24
+ * Use specific version for RuboCop
25
+ * Update RuboCop to 0.77
26
+
1
27
  # 1.0.0
2
28
 
3
29
  * Allow importing of Ruby and Rails rules seperately
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
@@ -1,4 +1,9 @@
1
1
  AllCops:
2
+ Exclude:
3
+ - 'bin/**'
4
+ - 'config.ru'
5
+ - 'tmp/**'
6
+
2
7
  DisplayCopNames:
3
8
  Description: 'Display cop names in offense messages'
4
9
  Enabled: true
@@ -55,7 +55,7 @@ Layout/IndentationConsistency:
55
55
  Description: Keep indentation straight.
56
56
  Enabled: true
57
57
 
58
- Metrics/LineLength:
58
+ Layout/LineLength:
59
59
  Description: Limit lines to 80 characters.
60
60
  Enabled: false
61
61
  Max: 80
@@ -114,7 +114,7 @@ Layout/TrailingWhitespace:
114
114
  Enabled: true
115
115
 
116
116
  # Supports --auto-correct
117
- Layout/TrailingBlankLines:
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
- Whitelist:
248
+ AllowedMethods:
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/AlignArray:
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/StringConversionInInterpolation:
326
+ Lint/RedundantStringCoercion:
327
327
  Description: Checks for Object#to_s usage in string interpolation.
328
328
  Enabled: true
329
329
 
@@ -46,7 +46,7 @@ Security/Eval:
46
46
  Description: 'The use of eval represents a serious security risk.'
47
47
  Enabled: true
48
48
 
49
- Lint/HandleExceptions:
49
+ Lint/SuppressedException:
50
50
  Description: "Don't suppress exception."
51
51
  Enabled: true
52
52
 
@@ -11,13 +11,13 @@ Style/Alias:
11
11
  Description: 'Use alias_method instead of alias.'
12
12
  Enabled: false
13
13
 
14
- Layout/AlignHash:
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/AlignParameters:
20
+ Layout/ParameterAlignment:
21
21
  Description: >-
22
22
  Align the parameters of a method call if they span more
23
23
  than one line.
@@ -58,10 +58,6 @@ Style/BlockDelimiters:
58
58
  Prefer {...} over do...end for single-line blocks.
59
59
  Enabled: false
60
60
 
61
- Style/BracesAroundHashParameters:
62
- Description: 'Enforce braces style inside hash parameters.'
63
- Enabled: true
64
-
65
61
  Style/CaseEquality:
66
62
  Description: 'Avoid explicit use of the case equality operator(===).'
67
63
  Enabled: false
@@ -168,13 +164,13 @@ Style/IfWithSemicolon:
168
164
  Description: 'Never use if x; .... Use the ternary operator instead.'
169
165
  Enabled: false
170
166
 
171
- Layout/IndentFirstArrayElement:
167
+ Layout/FirstArrayElementIndentation:
172
168
  Description: >-
173
169
  Checks the indentation of the first element in an array
174
170
  literal.
175
171
  Enabled: false
176
172
 
177
- Layout/IndentFirstHashElement:
173
+ Layout/FirstHashElementIndentation:
178
174
  Description: 'Checks the indentation of the first key in a hash literal.'
179
175
  Enabled: false
180
176
 
@@ -384,3 +380,12 @@ Style/WhileUntilModifier:
384
380
 
385
381
  Style/FrozenStringLiteralComment:
386
382
  Enabled: false
383
+
384
+ Style/HashEachMethods:
385
+ Enabled: true
386
+
387
+ Style/HashTransformKeys:
388
+ Enabled: true
389
+
390
+ Style/HashTransformValues:
391
+ Enabled: true
@@ -5,6 +5,11 @@
5
5
 
6
6
  require: rubocop-rails
7
7
 
8
+ AllCops:
9
+ Exclude:
10
+ - 'db/schema.rb'
11
+ - 'db/migrate/201*'
12
+
8
13
  Rails:
9
14
  Enabled: true
10
15
 
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: 1.0.0
4
+ version: 3.3.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-06 00:00:00.000000000 Z
11
+ date: 2020-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '12.0'
19
+ version: '13.0'
20
20
  type: :development
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: '12.0'
26
+ version: '13.0'
27
27
  - !ruby/object:Gem::Dependency
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.76'
33
+ version: 0.80.1
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.76'
40
+ version: 0.80.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rubocop-rails
43
43
  requirement: !ruby/object:Gem::Requirement