rubocop-pixelforce 1.0 → 2.0.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: 1588caf9ae02d875f314601fe24c5ccabf39a426d4a2a3c24d36fd77102e7038
4
- data.tar.gz: 84cf2619ac8bc213caa36b050352e8422d1caeff764ac167cf260d7d6545c17a
3
+ metadata.gz: 16bc89330d3996087dffc1f7e3ec8e3b50d8965ba6190d643e9177befe1ccf6f
4
+ data.tar.gz: 901f067575c85f4a2d5b3556ca8e99a834ac7323997e991cd1e5c4c00245d55e
5
5
  SHA512:
6
- metadata.gz: cdbdfc01ce3d8fa70e1c7286083b0d8dc924d71fdd7a49f1f9e6b65064b29c602809708feaa6a71b513ea78bdf7b242bdc8d48ea56cce5ae3f94036fcf97482f
7
- data.tar.gz: 0a008613890e9fb8d18cfc52d19300b2ff1d02c742b2e5e08cef57a35e0e2d9ae9f87138630c182d04579a09f1ca5583cd2a89d6c0bff16fd19c94a6437a6320
6
+ metadata.gz: 619e39e98a72ccd21a93dd177b9b28b6353eae540a03f9417ffff3f1d44426ee38aa9d790b5bcec172ea4248ffc35f9b03ab2afe79bf8afa76b111ee148f91b3
7
+ data.tar.gz: bd417a44a6b93879987cf76a238318faa6fd7c89c282ceeb68185d82389e18217dfe1378138ae03ad25eb8570adb73baf3499d91231d48f2f84c0726ee8ac0fa
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-pixelforce (1.0)
4
+ rubocop-pixelforce (2.0.0)
5
5
  rubocop (~> 1.21)
6
6
  rubocop-performance
7
7
  rubocop-rails
@@ -9,26 +9,45 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (6.1.4.1)
12
+ activesupport (7.1.5.1)
13
+ base64
14
+ benchmark (>= 0.3)
15
+ bigdecimal
13
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
+ connection_pool (>= 2.2.5)
18
+ drb
14
19
  i18n (>= 1.6, < 2)
20
+ logger (>= 1.4.2)
15
21
  minitest (>= 5.1)
22
+ mutex_m
23
+ securerandom (>= 0.3)
16
24
  tzinfo (~> 2.0)
17
- zeitwerk (~> 2.3)
18
- ast (2.4.2)
19
- concurrent-ruby (1.1.9)
25
+ ast (2.4.3)
26
+ base64 (0.2.0)
27
+ benchmark (0.4.0)
28
+ bigdecimal (3.1.9)
29
+ concurrent-ruby (1.3.5)
30
+ connection_pool (2.5.3)
20
31
  diff-lcs (1.3)
21
- i18n (1.8.10)
32
+ drb (2.2.3)
33
+ i18n (1.14.7)
22
34
  concurrent-ruby (~> 1.0)
23
- minitest (5.14.4)
24
- parallel (1.21.0)
25
- parser (3.0.2.0)
35
+ json (2.12.2)
36
+ language_server-protocol (3.17.0.5)
37
+ lint_roller (1.1.0)
38
+ logger (1.7.0)
39
+ minitest (5.25.5)
40
+ mutex_m (0.3.0)
41
+ parallel (1.27.0)
42
+ parser (3.3.8.0)
26
43
  ast (~> 2.4.1)
27
- rack (2.2.3)
28
- rainbow (3.0.0)
44
+ racc
45
+ prism (1.4.0)
46
+ racc (1.8.1)
47
+ rack (3.1.15)
48
+ rainbow (3.1.1)
29
49
  rake (13.0.1)
30
- regexp_parser (2.1.1)
31
- rexml (3.2.5)
50
+ regexp_parser (2.10.0)
32
51
  rspec (3.9.0)
33
52
  rspec-core (~> 3.9.0)
34
53
  rspec-expectations (~> 3.9.0)
@@ -42,29 +61,37 @@ GEM
42
61
  diff-lcs (>= 1.2.0, < 2.0)
43
62
  rspec-support (~> 3.9.0)
44
63
  rspec-support (3.9.0)
45
- rubocop (1.21.0)
64
+ rubocop (1.75.7)
65
+ json (~> 2.3)
66
+ language_server-protocol (~> 3.17.0.2)
67
+ lint_roller (~> 1.1.0)
46
68
  parallel (~> 1.10)
47
- parser (>= 3.0.0.0)
69
+ parser (>= 3.3.0.2)
48
70
  rainbow (>= 2.2.2, < 4.0)
49
- regexp_parser (>= 1.8, < 3.0)
50
- rexml
51
- rubocop-ast (>= 1.9.1, < 2.0)
71
+ regexp_parser (>= 2.9.3, < 3.0)
72
+ rubocop-ast (>= 1.44.0, < 2.0)
52
73
  ruby-progressbar (~> 1.7)
53
- unicode-display_width (>= 1.4.0, < 3.0)
54
- rubocop-ast (1.11.0)
55
- parser (>= 3.0.1.1)
56
- rubocop-performance (1.11.5)
57
- rubocop (>= 1.7.0, < 2.0)
58
- rubocop-ast (>= 0.4.0)
59
- rubocop-rails (2.12.2)
74
+ unicode-display_width (>= 2.4.0, < 4.0)
75
+ rubocop-ast (1.44.1)
76
+ parser (>= 3.3.7.2)
77
+ prism (~> 1.4)
78
+ rubocop-performance (1.25.0)
79
+ lint_roller (~> 1.1)
80
+ rubocop (>= 1.75.0, < 2.0)
81
+ rubocop-ast (>= 1.38.0, < 2.0)
82
+ rubocop-rails (2.32.0)
60
83
  activesupport (>= 4.2.0)
84
+ lint_roller (~> 1.1)
61
85
  rack (>= 1.1)
62
- rubocop (>= 1.7.0, < 2.0)
63
- ruby-progressbar (1.11.0)
64
- tzinfo (2.0.4)
86
+ rubocop (>= 1.75.0, < 2.0)
87
+ rubocop-ast (>= 1.44.0, < 2.0)
88
+ ruby-progressbar (1.13.0)
89
+ securerandom (0.3.2)
90
+ tzinfo (2.0.6)
65
91
  concurrent-ruby (~> 1.0)
66
- unicode-display_width (2.0.0)
67
- zeitwerk (2.4.2)
92
+ unicode-display_width (3.1.4)
93
+ unicode-emoji (~> 4.0, >= 4.0.4)
94
+ unicode-emoji (4.0.4)
68
95
 
69
96
  PLATFORMS
70
97
  ruby
data/default.yml CHANGED
@@ -1,6 +1,8 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-performance
3
3
  - rubocop-rails
4
+
5
+ require:
4
6
  - rubocop-pixelforce
5
7
 
6
8
  AllCops:
@@ -9,6 +11,7 @@ AllCops:
9
11
  - 'db/**/*'
10
12
  - 'bin/*'
11
13
  - 'config/**/*'
14
+ - 'test/**/*'
12
15
 
13
16
  Rails/UnknownEnv:
14
17
  Environments:
@@ -18,7 +21,7 @@ Rails/UnknownEnv:
18
21
  - staging
19
22
 
20
23
  Rails/HasManyOrHasOneDependent:
21
- Enabled: false
24
+ Enabled: false
22
25
 
23
26
  Rails/FilePath:
24
27
  Enabled: false
@@ -81,7 +84,7 @@ Pixelforce/EmptyLineBwteenCategories:
81
84
  <<: *class_structures
82
85
  Enabled: true
83
86
 
84
- Layout/AlignHash:
87
+ Layout/HashAlignment:
85
88
  EnforcedColonStyle: table
86
89
 
87
90
  Metrics/ModuleLength:
@@ -93,10 +96,10 @@ Style/NestedTernaryOperator:
93
96
  Style/FrozenStringLiteralComment:
94
97
  Enabled: false
95
98
 
96
- Documentation:
99
+ Style/Documentation:
97
100
  Enabled: false
98
101
 
99
- Metrics/LineLength:
102
+ Layout/LineLength:
100
103
  Enabled: false
101
104
 
102
105
  Metrics/MethodLength:
@@ -139,4 +142,4 @@ Style/GlobalVars:
139
142
  Enabled: false
140
143
 
141
144
  Metrics/ParameterLists:
142
- Enabled: false
145
+ Enabled: false
@@ -1,7 +1,7 @@
1
1
  module RuboCop
2
2
  module Cop
3
3
  module Pixelforce
4
- class EmptyLineBwteenCategories < Cop
4
+ class EmptyLineBetweenCategories < Base
5
5
  include RangeHelp
6
6
 
7
7
  HUMANIZED_NODE_TYPE = {
@@ -26,6 +26,7 @@ module RuboCop
26
26
  previous_method_name = nil
27
27
  walk_over_nested_class_definition(class_node) do |node, category|
28
28
  next unless node.respond_to?(:method_name)
29
+
29
30
  if previous_category && category != previous_category && node.loc.first_line - previous_node_end_line < 2
30
31
  add_offense(node, message: MSG)
31
32
  end
@@ -37,7 +38,7 @@ module RuboCop
37
38
  previous_node_end_line = node.loc.last_line
38
39
  previous_method_name = node.method_name
39
40
  end
40
- end
41
+ end
41
42
 
42
43
  def autocorrect(node)
43
44
  prev_category = prev_node(node)
@@ -221,14 +222,14 @@ module RuboCop
221
222
  cop_config['Categories']
222
223
  end
223
224
 
224
- def autocorrect_remove_lines(newline_pos, count)
225
+ def autocorrect_remove_lines(newline_pos, _count)
225
226
  range_to_remove = range_between(newline_pos, newline_pos + 1)
226
227
  lambda do |corrector|
227
228
  corrector.remove(range_to_remove)
228
229
  end
229
230
  end
230
231
 
231
- def autocorrect_insert_lines(newline_pos, count)
232
+ def autocorrect_insert_lines(newline_pos, _count)
232
233
  where_to_insert = range_between(newline_pos, newline_pos + 1)
233
234
  lambda do |corrector|
234
235
  corrector.insert_after(where_to_insert, "\n")
@@ -237,4 +238,4 @@ module RuboCop
237
238
  end
238
239
  end
239
240
  end
240
- end
241
+ end
@@ -1,5 +1,5 @@
1
1
  module Rubocop
2
2
  module Pixelforce
3
- VERSION = "1.0"
3
+ VERSION = '2.0.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-pixelforce
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Zhang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-16 00:00:00.000000000 Z
11
+ date: 2025-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubygems_version: 3.2.3
141
+ rubygems_version: 3.2.33
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: Custom Rubocop cop for PixelForce.