rubocop-erb 0.2.4 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 738549237ab33ab64f83e5a7c2a6804023e44a4b820a672e19f22501f567dc8c
4
- data.tar.gz: '0938d75738dde9b60da3f86303e2efc865a6651a2097f1c17b02a310fb48cc65'
3
+ metadata.gz: 742cdbab5d75368c8a97e45b610809a11ee36a806b7a6eea84e85b9f5810cd9e
4
+ data.tar.gz: 10da21545ab9f73ada119f5cb2a54dda6e297bbc5660325fa098aa0e92c83787
5
5
  SHA512:
6
- metadata.gz: 44c40245e84d96ca53eca30b4b10520b150960df5caa08367167eee18b98039bc4dd79d0b3a1579f1cd1fc4adc6704c2e2889a2d49ebe6ac9b54c6500339f558
7
- data.tar.gz: d1eb898d1bd7fae46842f82aa9c7c4b7acc980ec3866dbc9cd94a7dab20fc850e4f0a6509958a3bf22adfab47b8c9dc91fba8767aa52ba39362db8ac936c1db8
6
+ metadata.gz: 585098a85e2b0d6c4b3cd286014a2f2e1578e6744241f3cc3f098f2533f6346268c3e207937f359385b882db3ec4e189d8d680b787d28839c98c72881dbb617d
7
+ data.tar.gz: 21cdb3c2918b0d01eee173e24dafbedde1340459e7c884ca7e62e3688e85b53faf576ac883753774738b9b9f7cc62c2901c21150af092b02a1e44492e0a90ab5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-erb (0.2.4)
4
+ rubocop-erb (0.3.0)
5
5
  better_html
6
6
  rubocop (~> 1.45)
7
7
 
@@ -20,7 +20,7 @@ GEM
20
20
  minitest (>= 5.1)
21
21
  tzinfo (~> 2.0)
22
22
  ast (2.4.2)
23
- better_html (2.0.1)
23
+ better_html (2.0.2)
24
24
  actionview (>= 6.0)
25
25
  activesupport (>= 6.0)
26
26
  ast (~> 2.0)
@@ -35,21 +35,23 @@ GEM
35
35
  i18n (1.12.0)
36
36
  concurrent-ruby (~> 1.0)
37
37
  json (2.6.3)
38
- loofah (2.19.1)
38
+ loofah (2.21.3)
39
39
  crass (~> 1.0.2)
40
- nokogiri (>= 1.5.9)
40
+ nokogiri (>= 1.12.0)
41
41
  minitest (5.17.0)
42
- nokogiri (1.14.2-x86_64-linux)
42
+ nokogiri (1.15.3-x86_64-linux)
43
43
  racc (~> 1.4)
44
44
  parallel (1.22.1)
45
45
  parser (3.2.0.0)
46
46
  ast (~> 2.4.1)
47
- racc (1.6.2)
48
- rails-dom-testing (2.0.3)
49
- activesupport (>= 4.2.0)
47
+ racc (1.7.1)
48
+ rails-dom-testing (2.1.1)
49
+ activesupport (>= 5.0.0)
50
+ minitest
50
51
  nokogiri (>= 1.6)
51
- rails-html-sanitizer (1.5.0)
52
- loofah (~> 2.19, >= 2.19.1)
52
+ rails-html-sanitizer (1.6.0)
53
+ loofah (~> 2.21)
54
+ nokogiri (~> 1.14)
53
55
  rainbow (3.1.1)
54
56
  rake (13.0.6)
55
57
  regexp_parser (2.6.2)
data/README.md CHANGED
@@ -33,7 +33,7 @@ Now you can use RuboCop also for ERB templates.
33
33
  ```
34
34
  $ bundle exec rubocop spec/fixtures/dummy.erb
35
35
  Inspecting 1 file
36
- E
36
+ C
37
37
 
38
38
  Offenses:
39
39
 
@@ -46,12 +46,11 @@ spec/fixtures/dummy.erb:4:9: C: [Correctable] Style/ZeroLengthPredicate: Use !em
46
46
  spec/fixtures/dummy.erb:5:4: C: [Correctable] Style/NegatedIf: Favor unless over if for negative conditions.
47
47
  <% a if !b %>
48
48
  ^^^^^^^
49
- spec/fixtures/dummy.erb:7:11: E: Lint/Syntax: unexpected token $end
50
- (Using Ruby 2.6 parser; configure using TargetRubyVersion parameter, under AllCops)
49
+ spec/fixtures/dummy.erb:7:7: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
51
50
  <% if "a" %>
51
+ ^^^
52
52
 
53
-
54
- 1 file inspected, 4 offenses detected, 3 offenses autocorrectable
53
+ 1 file inspected, 4 offenses detected, 4 offenses autocorrectable
55
54
  ```
56
55
 
57
56
  ## Workaround
data/config/default.yml CHANGED
@@ -75,6 +75,10 @@ Layout/IndentationWidth:
75
75
  Exclude:
76
76
  - '**/*.erb'
77
77
 
78
+ Layout/LeadingEmptyLine:
79
+ Exclude:
80
+ - '**/*.erb'
81
+
78
82
  Layout/LineEndStringConcatenationIndentation:
79
83
  Exclude:
80
84
  - '**/*.erb'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Erb
5
- VERSION = '0.2.4'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-erb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-26 00:00:00.000000000 Z
11
+ date: 2023-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: better_html