haml_lint 0.25.0 → 0.25.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/haml_lint/report.rb +1 -1
- data/lib/haml_lint/tree/tag_node.rb +4 -1
- data/lib/haml_lint/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf05f1a1e2ec9d5ca6b6a6cd1ae398c8bf99f394
|
4
|
+
data.tar.gz: 39ea41022301f4ec279256bf6a9bfb930b786e25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ff5514837ce5b08d1571e2c61fe26b8fd9b26c063b7582cfafecb353bc308988bc9c64773b932821efd7d5122b2b64babd200dc5f69f2e1df2ef59874a6b063
|
7
|
+
data.tar.gz: 08ca2d1c74ae2c561734f6c69e65257e0ee8a64658e919be2875c367a83b217422e4dfa8fb7efce137f3cda118fed35d9e53de00fb4371046360aab39d6b8e67
|
data/lib/haml_lint/report.rb
CHANGED
@@ -16,7 +16,7 @@ module HamlLint
|
|
16
16
|
# @param files [Array<String>] files that were linted
|
17
17
|
# @param fail_level [Symbol] the severity level to fail on
|
18
18
|
# @param reporter [HamlLint::Reporter] the reporter for the report
|
19
|
-
def initialize(lints = [], files = [], fail_level = :warning, reporter:)
|
19
|
+
def initialize(lints = [], files = [], fail_level = :warning, reporter: nil)
|
20
20
|
@lints = lints.sort_by { |l| [l.filename, l.line] }
|
21
21
|
@files = files
|
22
22
|
@fail_level = Severity.new(fail_level)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module HamlLint::Tree
|
2
2
|
# Represents a tag node in a HAML document.
|
3
|
+
# rubocop:disable ClassLength
|
3
4
|
class TagNode < Node
|
4
5
|
# Computed set of attribute hashes code.
|
5
6
|
#
|
@@ -234,7 +235,9 @@ module HamlLint::Tree
|
|
234
235
|
private
|
235
236
|
|
236
237
|
def existing_attributes
|
237
|
-
|
238
|
+
parsed_attrs = parsed_attributes
|
239
|
+
return {} unless parsed_attrs.respond_to?(:children)
|
240
|
+
parsed_attrs.children.collect do |parsed_attribute|
|
238
241
|
parsed_attribute.children.first.to_a.first
|
239
242
|
end
|
240
243
|
end
|
data/lib/haml_lint/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml_lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brigade Engineering
|
@@ -204,8 +204,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
204
|
version: '0'
|
205
205
|
requirements: []
|
206
206
|
rubyforge_project:
|
207
|
-
rubygems_version: 2.5.
|
207
|
+
rubygems_version: 2.4.5.1
|
208
208
|
signing_key:
|
209
209
|
specification_version: 4
|
210
210
|
summary: HAML lint tool
|
211
211
|
test_files: []
|
212
|
+
has_rdoc:
|