rubocop-github 0.23.0 → 0.25.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: f8617543354d9bac60144913034d9d547b8d7e02ba61562a855159117848ae9e
4
+ data.tar.gz: f2ec504e0ae1cd52cfb57434f816f31c22f08fb843cac9e8f655eac9194ce8fd
5
5
  SHA512:
6
- metadata.gz: f738eee673c0bfb656397d4ca3700d440727e91068df5e855cecc2a82e0f2c58e1e50fca8c55caf75f0ff644644c097fab91dc9bbbdca18b1b251dc288d03ed0
7
- data.tar.gz: f0c1c5a71d71643df7ff30da1bd999423f5ab07eeed36cf5f08bb948573c7bb960cb5aa4d82ef71fb3af3fde3335b767230b054691a6fb487db1c95a7e56f2d7
6
+ metadata.gz: e38c676b69048676507e929418e6630da25c988b6c24d3be412e1cb450421df683f27888732a7d630c13cce1ecd2d037e470d03a1cf2fc272f3a3935d6f5f84d
7
+ data.tar.gz: 39fc0a3a59cb6b3a9d8b75d3c860145d4490f775eb95ce895166650199a9d068a26218b416f30fa9bff5ea9bf6de31b8491711f1ff6e1c671a90fc43a4951074
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
@@ -5,7 +5,8 @@ require:
5
5
  - rubocop-github
6
6
 
7
7
  plugins:
8
- - rubocop-performance
8
+ - rubocop-performance:
9
+ plugin_class_name: RuboCop::Performance::Plugin
9
10
 
10
11
  Bundler/DuplicatedGem:
11
12
  Enabled: true
@@ -1370,7 +1371,7 @@ Style/NegatedIfElseCondition:
1370
1371
  Enabled: false
1371
1372
 
1372
1373
  Style/NegatedUnless:
1373
- Enabled: false
1374
+ Enabled: true
1374
1375
 
1375
1376
  Style/NegatedWhile:
1376
1377
  Enabled: false
data/config/rails.yml CHANGED
@@ -5,7 +5,8 @@ require:
5
5
  - rubocop-github-rails
6
6
 
7
7
  plugins:
8
- - rubocop-rails
8
+ - rubocop-rails:
9
+ plugin_class_name: RuboCop::Rails::Plugin
9
10
 
10
11
  GitHub/RailsControllerRenderActionSymbol:
11
12
  Enabled: true
@@ -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.25.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.25.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
  - - ">="