haml_lint 0.34.2 → 0.35.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85d02f79b2988c1c3be9c98affa2dca57e3f52751d140191e8e3654f86ed7d3f
|
4
|
+
data.tar.gz: f5c798d7646ee43da478a2a20bf310dc0cb7949061b3bcf243e94ee7ea173e2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c902d2c3a8586d5595096fe2e1907a045313594d032ea0fa074f2b6398822a3228d41ff007b5f77296f3cf541ec65d2206bfc5e7350c132be9b0535f1066b29c
|
7
|
+
data.tar.gz: 42ab15c490582e03eb40f10883da0b697abafe78c3976f121945bc0a3a794309cd4faccf7df23c8066aa0ca20f2d4f00fb75c0b74e70e75ee7882101691461bb
|
@@ -56,7 +56,12 @@ module HamlLint
|
|
56
56
|
# @param file [String]
|
57
57
|
# @return [Array<RuboCop::Cop::Offense>]
|
58
58
|
def lint_file(rubocop, file)
|
59
|
-
rubocop.run(rubocop_flags << file)
|
59
|
+
status = rubocop.run(rubocop_flags << file)
|
60
|
+
unless [::RuboCop::CLI::STATUS_SUCCESS, ::RuboCop::CLI::STATUS_OFFENSES].include?(status)
|
61
|
+
raise HamlLint::Exceptions::ConfigurationError,
|
62
|
+
"RuboCop exited unsuccessfully with status #{status}." \
|
63
|
+
' Check the stack trace to see if there was a misconfiguration.'
|
64
|
+
end
|
60
65
|
OffenseCollector.offenses
|
61
66
|
end
|
62
67
|
|
@@ -43,7 +43,7 @@ module HamlLint
|
|
43
43
|
# given special treatment, thus making enclosing it in a string necessary.
|
44
44
|
def starts_with_reserved_character?(stringish)
|
45
45
|
string = stringish.respond_to?(:children) ? stringish.children.first : stringish
|
46
|
-
string =~ %r{\A\s*[/#-=%~]}
|
46
|
+
string =~ %r{\A\s*[/#-=%~]} if string.is_a?(String)
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
@@ -17,7 +17,9 @@ module HamlLint::Tree
|
|
17
17
|
# @param line [Integer] the line number of the node
|
18
18
|
# @return [HamlLint::Node]
|
19
19
|
def node_for_line(line)
|
20
|
-
find(-> { HamlLint::Tree::NullNode.new })
|
20
|
+
find(-> { HamlLint::Tree::NullNode.new }) do |node|
|
21
|
+
node.line_numbers.cover?(line) && node != self
|
22
|
+
end
|
21
23
|
end
|
22
24
|
end
|
23
25
|
end
|
data/lib/haml_lint/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml_lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.35.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane da Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: haml
|