rubocop-github 0.22.0 → 0.24.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e158f9c46a8771d2dced9060e0ca5ede3e55ffddb13d6e8cfa8c6b7bfdce2888
4
- data.tar.gz: c0b8bbed2b058338dd2e39e9050943aed6b69683c88af4f615d733276f1f1582
3
+ metadata.gz: 56060d50404e2ea343a8a561777417e59b20e2ab42e9b804cc77a72e929742ca
4
+ data.tar.gz: f70290056aa82c4261ce602d5d4c469792cda56d8f3936d9c912e6664542d238
5
5
  SHA512:
6
- metadata.gz: aafbf512fdadbffcac228fc45fc4877cfb6ea10bd3b35a7673eea11e8010888d1e7dd4686632a4239a63fd9d431a8e9a844dfcac4a62a129c8b410461cfe5389
7
- data.tar.gz: e1961e828dbb86115b9969ba92c2a7bda764f9607effc0a25a3b729d4c21677fa0b25dedb126f25e0b7838a173eec30d782f264f4326723dc17a0a3367203e04
6
+ metadata.gz: 8ae85d5c7127a242d86f545152edae99daf6519ac0be04d6493f5c87022e47d12a4c252633674a4d645c7194ee9dfa0bc2b97e1c0c4234f8a1c2e18412b08e0e
7
+ data.tar.gz: 2ce828f524149d5b2630f622afae2e50afa322b7d3bd3ebb87ab337ab4dfe4be86502ee50f3603f43e6c7bc25ddfc2f5f49cb8ffa28d89adeab1486420c331c3
data/STYLEGUIDE.md CHANGED
@@ -3,6 +3,7 @@
3
3
  This is GitHub's Ruby Style Guide, inspired by [RuboCop's guide][rubocop-guide].
4
4
 
5
5
  ## Table of Contents
6
+
6
7
  1. [Layout](#layout)
7
8
  1. [Indentation](#indentation)
8
9
  2. [Inline](#inline)
@@ -763,6 +764,22 @@ if x > 10
763
764
  end
764
765
  ```
765
766
 
767
+ * Don't use `unless` with a negated condition.
768
+ <a name="no-unless-negation"></a><sup>[[link](#no-unless-negation)]</sup>
769
+ * <a href="https://docs.rubocop.org/rubocop/cops_style.html#stylenegatedunless">RuboCop rule: Style/NegatedUnless</a>
770
+
771
+ ```ruby
772
+ # bad
773
+ unless !condition?
774
+ do_something
775
+ end
776
+
777
+ # good
778
+ if condition?
779
+ do_something
780
+ end
781
+ ```
782
+
766
783
  ### Ternary operator
767
784
 
768
785
  * Avoid the ternary operator (`?:`) except in cases where all expressions are extremely
data/config/default.yml CHANGED
@@ -3,6 +3,8 @@ inherit_from:
3
3
 
4
4
  require:
5
5
  - rubocop-github
6
+
7
+ plugins:
6
8
  - rubocop-performance
7
9
 
8
10
  Bundler/DuplicatedGem:
@@ -1368,7 +1370,7 @@ Style/NegatedIfElseCondition:
1368
1370
  Enabled: false
1369
1371
 
1370
1372
  Style/NegatedUnless:
1371
- Enabled: false
1373
+ Enabled: true
1372
1374
 
1373
1375
  Style/NegatedWhile:
1374
1376
  Enabled: false
data/config/rails.yml CHANGED
@@ -3,6 +3,8 @@ inherit_from:
3
3
 
4
4
  require:
5
5
  - rubocop-github-rails
6
+
7
+ plugins:
6
8
  - rubocop-rails
7
9
 
8
10
  GitHub/RailsControllerRenderActionSymbol:
@@ -54,7 +54,7 @@ module RuboCop
54
54
 
55
55
  if render_literal?(node) && node.arguments.count > 1
56
56
  locals = node.arguments[1]
57
- elsif options_pairs = render_with_options?(node)
57
+ elsif option_pairs = render_with_options?(node)
58
58
  locals = option_pairs.map { |pair| locals_key?(pair) }.compact.first
59
59
  end
60
60
 
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- VERSION = "0.22.0"
3
+ VERSION = "0.24.0"
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-02-21 00:00:00.000000000 Z
10
+ date: 2025-05-27 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rubocop
@@ -16,56 +15,56 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '1.37'
18
+ version: '1.72'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: '1.37'
25
+ version: '1.72'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: rubocop-performance
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
- version: '1.15'
32
+ version: '1.24'
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - ">="
39
38
  - !ruby/object:Gem::Version
40
- version: '1.15'
39
+ version: '1.24'
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: rubocop-rails
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - ">="
46
45
  - !ruby/object:Gem::Version
47
- version: '2.17'
46
+ version: '2.23'
48
47
  type: :runtime
49
48
  prerelease: false
50
49
  version_requirements: !ruby/object:Gem::Requirement
51
50
  requirements:
52
51
  - - ">="
53
52
  - !ruby/object:Gem::Version
54
- version: '2.17'
53
+ version: '2.23'
55
54
  - !ruby/object:Gem::Dependency
56
55
  name: actionview
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
- - - ">="
58
+ - - "~>"
60
59
  - !ruby/object:Gem::Version
61
- version: '0'
60
+ version: 7.2.2.1
62
61
  type: :development
63
62
  prerelease: false
64
63
  version_requirements: !ruby/object:Gem::Requirement
65
64
  requirements:
66
- - - ">="
65
+ - - "~>"
67
66
  - !ruby/object:Gem::Version
68
- version: '0'
67
+ version: 7.2.2.1
69
68
  - !ruby/object:Gem::Dependency
70
69
  name: minitest
71
70
  requirement: !ruby/object:Gem::Requirement
@@ -135,7 +134,6 @@ metadata:
135
134
  source_code_uri: https://github.com/github/rubocop-github
136
135
  documentation_uri: https://github.com/github/rubocop-github
137
136
  bug_tracker_uri: https://github.com/github/rubocop-github/issues
138
- post_install_message:
139
137
  rdoc_options: []
140
138
  require_paths:
141
139
  - lib
@@ -143,15 +141,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
141
  requirements:
144
142
  - - ">="
145
143
  - !ruby/object:Gem::Version
146
- version: 3.0.0
144
+ version: 3.1.0
147
145
  required_rubygems_version: !ruby/object:Gem::Requirement
148
146
  requirements:
149
147
  - - ">="
150
148
  - !ruby/object:Gem::Version
151
149
  version: '0'
152
150
  requirements: []
153
- rubygems_version: 3.4.6
154
- signing_key:
151
+ rubygems_version: 3.6.2
155
152
  specification_version: 4
156
153
  summary: RuboCop GitHub
157
154
  test_files: []