salsify_rubocop 1.59.1 → 1.74.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: 522b6f5caca717c57ec52f108f3b3f39a6c0b661482dde71d8a3a6b7ef66bff1
4
- data.tar.gz: 97c1f7ab21848c1d251e5375a4f04b1537c682878574b05e1f75146457901058
3
+ metadata.gz: 04d76544a5d6aae6ddd1154cee539489026224153120d314a9dd80fed6765be0
4
+ data.tar.gz: 1a26b0238f38a29663ff1132140db522f63804efd0f62729e6a2b633d764af4a
5
5
  SHA512:
6
- metadata.gz: a8c33cbcfca66232c6d28af18e6e80caebbde6af9df134901fa216181ff25477454233cee8b5818499a7a0c5d0ee441bafd404b9b6c793413ad13bfe4e3f690d
7
- data.tar.gz: 5b56f34aa96952d51bad543cab0a8716af0fcda64aff7fdbde43683133f1eabc4500899596c2b87bde0b62c9ef092d768b2753852c145207ba305d75e821d3ef
6
+ metadata.gz: a3826cfe3896c3bf4de2da7aed4f3a3ee3a9cabffd0f816fda262db7199365ae31c9b7cdcf861ef2cd52c059831c8e8ba20f259d5b9943010f2d42a8f3db34a0
7
+ data.tar.gz: d60e9c9c926bc8ef3799008cadc98c92a70187d715975785e2d3a5564a89fb0f549f011d907d4502397532d1dde33472ecc30277055c740ac660f0680b04450a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # salsify_rubocop
2
2
 
3
+ ## 1.74.0
4
+ - Upgrade `rubocop` to v1.74.0.
5
+
6
+ ## 1.68.0
7
+ - Upgrade `rubocop` to v1.68.0.
8
+
3
9
  ## 1.59.1
4
10
  - Add Rake specific checks with the [official extension, rubocop-rake](https://docs.rubocop.org/rubocop/extensions.html#official-extensions):
5
11
  - Enforce description (`desc`) for rake tasks, as otherwise they are not listed when `rake -T` is called
@@ -12,7 +12,7 @@ module RuboCop
12
12
  #
13
13
  # # bad
14
14
  # User.unscoped
15
- class RailsUnscoped < Cop
15
+ class RailsUnscoped < ::RuboCop::Cop::Base
16
16
  MSG = 'Explicitly remove scopes instead of using `unscoped`.'
17
17
 
18
18
  def_node_matcher :unscoped?, <<-PATTERN
@@ -22,7 +22,7 @@ module RuboCop
22
22
  def on_send(node)
23
23
  return unless unscoped?(node)
24
24
 
25
- add_offense(node, location: :expression, message: MSG)
25
+ add_offense(node, message: MSG)
26
26
  end
27
27
  end
28
28
  end
@@ -18,10 +18,8 @@ module RuboCop
18
18
  # my_hash['foo'] && my_hash['foo']['bar']
19
19
  # my_array[0][1]
20
20
 
21
- class StyleDig < Cop
22
- extend TargetRubyVersion
23
-
24
- minimum_target_ruby_version 2.3
21
+ class StyleDig < ::RuboCop::Cop::Base
22
+ extend RuboCop::Cop::AutoCorrector
25
23
 
26
24
  MSG = 'Use `dig` for nested access.'
27
25
 
@@ -35,7 +33,9 @@ module RuboCop
35
33
  match_node = node
36
34
  # walk to outermost access node
37
35
  match_node = match_node.parent while access_node?(match_node.parent)
38
- add_offense(match_node, location: :expression, message: MSG)
36
+ add_offense(match_node, message: MSG) do |corrector|
37
+ autocorrect(match_node)[corrector]
38
+ end
39
39
  end
40
40
 
41
41
  def autocorrect(node)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SalsifyRubocop
4
- VERSION = '1.59.1'
4
+ VERSION = '1.74.0'
5
5
  end
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
37
37
  spec.add_development_dependency 'rspec', '~> 3.0'
38
38
  spec.add_development_dependency 'rspec_junit_formatter'
39
39
 
40
- spec.add_runtime_dependency 'rubocop', '~> 1.59.0'
40
+ spec.add_runtime_dependency 'rubocop', '~> 1.74.0'
41
41
  spec.add_runtime_dependency 'rubocop-performance', '~> 1.15.2'
42
42
  spec.add_runtime_dependency 'rubocop-rails', '~> 2.17.4'
43
43
  spec.add_runtime_dependency 'rubocop-rake', '~> 0.6.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: salsify_rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.59.1
4
+ version: 1.74.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Salsify, Inc
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-29 00:00:00.000000000 Z
11
+ date: 2025-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.59.0
75
+ version: 1.74.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.59.0
82
+ version: 1.74.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop-performance
85
85
  requirement: !ruby/object:Gem::Requirement