Skip to content

Commit 2611585

Browse files
authored
Merge pull request #181 from github/dependabot/bundler/rubocop-1.69.0
build(deps-dev): update rubocop requirement from = 1.68.0 to = 1.69.0
2 parents 82f73ca + 6a126c3 commit 2611585

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

Gemfile.lock

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ GEM
4747
erubi (1.13.0)
4848
i18n (1.14.6)
4949
concurrent-ruby (~> 1.0)
50-
json (2.7.5)
50+
json (2.8.2)
5151
language_server-protocol (3.17.0.3)
5252
loofah (2.23.1)
5353
crass (~> 1.0.2)
@@ -61,7 +61,7 @@ GEM
6161
mini_portile2 (~> 2.8.2)
6262
racc (~> 1.4)
6363
parallel (1.26.3)
64-
parser (3.3.5.1)
64+
parser (3.3.6.0)
6565
ast (~> 2.4.1)
6666
racc
6767
racc (1.8.1)
@@ -75,18 +75,18 @@ GEM
7575
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
7676
rainbow (3.1.1)
7777
rake (13.2.1)
78-
regexp_parser (2.9.2)
79-
rubocop (1.68.0)
78+
regexp_parser (2.9.3)
79+
rubocop (1.69.0)
8080
json (~> 2.3)
8181
language_server-protocol (>= 3.17.0)
8282
parallel (~> 1.10)
8383
parser (>= 3.3.0.2)
8484
rainbow (>= 2.2.2, < 4.0)
8585
regexp_parser (>= 2.4, < 3.0)
86-
rubocop-ast (>= 1.32.2, < 2.0)
86+
rubocop-ast (>= 1.36.1, < 2.0)
8787
ruby-progressbar (~> 1.7)
88-
unicode-display_width (>= 2.4.0, < 3.0)
89-
rubocop-ast (1.33.1)
88+
unicode-display_width (>= 2.4.0, < 4.0)
89+
rubocop-ast (1.36.2)
9090
parser (>= 3.3.1.0)
9191
rubocop-github (0.20.0)
9292
rubocop (>= 1.37)
@@ -104,7 +104,9 @@ GEM
104104
smart_properties (1.17.0)
105105
tzinfo (2.0.6)
106106
concurrent-ruby (~> 1.0)
107-
unicode-display_width (2.6.0)
107+
unicode-display_width (3.1.2)
108+
unicode-emoji (~> 4.0, >= 4.0.4)
109+
unicode-emoji (4.0.4)
108110

109111
PLATFORMS
110112
ruby
@@ -115,7 +117,7 @@ DEPENDENCIES
115117
minitest (~> 5.25.1)
116118
mocha (~> 2.6.0)
117119
rake (~> 13.2.1)
118-
rubocop (= 1.68.0)
120+
rubocop (= 1.69.0)
119121
rubocop-github (~> 0.20.0)
120122

121123
BUNDLED WITH

erblint-github.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
2121
s.add_development_dependency "mocha", "~> 2.6.0"
2222
s.add_development_dependency "rake", "~> 13.2.1"
2323

24-
s.add_development_dependency "rubocop", "= 1.68.0"
24+
s.add_development_dependency "rubocop", "= 1.69.0"
2525
s.add_development_dependency "rubocop-github", "~> 0.20.0"
2626
s.metadata["rubygems_mfa_required"] = "true"
2727

lib/erblint-github/linters/custom_helpers.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ def counter_correct?(processed_source)
3636
processed_source.parser.ast.descendants(:erb).each do |node|
3737
indicator_node, _, code_node, = *node
3838
indicator = indicator_node&.loc&.source
39-
comment = code_node&.loc&.source&.strip
39+
comment = code_node&.loc&.source
40+
stripped_comment = comment&.strip
4041

41-
if indicator == "#" && comment.start_with?("erblint:counter") && comment.match(rule_name)
42+
if indicator == "#" && stripped_comment.start_with?("erblint:counter") && stripped_comment.match(rule_name)
4243
comment_node = node
43-
expected_count = comment.match(/\s(\d+)\s?$/)[1].to_i
44+
expected_count = stripped_comment.match(/\s(\d+)\s?$/)[1].to_i
4445
end
4546
end
4647

0 commit comments

Comments
 (0)