rubocop-github 0.23.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: 0ac1a38127e5b53652d7f45eafe37d56a3292733cd2b8fbc51d9850c0ba7cb35
4
- data.tar.gz: 1178bcc28c86fad227f719bd657e722528275f606dd18bd7259593952df014ba
3
+ metadata.gz: 56060d50404e2ea343a8a561777417e59b20e2ab42e9b804cc77a72e929742ca
4
+ data.tar.gz: f70290056aa82c4261ce602d5d4c469792cda56d8f3936d9c912e6664542d238
5
5
  SHA512:
6
- metadata.gz: f738eee673c0bfb656397d4ca3700d440727e91068df5e855cecc2a82e0f2c58e1e50fca8c55caf75f0ff644644c097fab91dc9bbbdca18b1b251dc288d03ed0
7
- data.tar.gz: f0c1c5a71d71643df7ff30da1bd999423f5ab07eeed36cf5f08bb948573c7bb960cb5aa4d82ef71fb3af3fde3335b767230b054691a6fb487db1c95a7e56f2d7
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
@@ -1370,7 +1370,7 @@ Style/NegatedIfElseCondition:
1370
1370
  Enabled: false
1371
1371
 
1372
1372
  Style/NegatedUnless:
1373
- Enabled: false
1373
+ Enabled: true
1374
1374
 
1375
1375
  Style/NegatedWhile:
1376
1376
  Enabled: false
@@ -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.23.0"
3
+ VERSION = "0.24.0"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0
4
+ version: 0.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-27 00:00:00.000000000 Z
10
+ date: 2025-05-27 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rubocop
@@ -57,14 +57,14 @@ dependencies:
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 7.1.5.1
60
+ version: 7.2.2.1
61
61
  type: :development
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: 7.1.5.1
67
+ version: 7.2.2.1
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: minitest
70
70
  requirement: !ruby/object:Gem::Requirement
@@ -141,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - ">="
143
143
  - !ruby/object:Gem::Version
144
- version: 3.0.0
144
+ version: 3.1.0
145
145
  required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  requirements:
147
147
  - - ">="