haml_lint 0.34.0 → 0.34.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/default.yml +6 -3
- data/lib/haml_lint/file_finder.rb +1 -1
- data/lib/haml_lint/linter/repeated_id.rb +1 -1
- data/lib/haml_lint/linter/space_before_script.rb +1 -1
- data/lib/haml_lint/linter/unnecessary_string_output.rb +1 -1
- data/lib/haml_lint/utils.rb +1 -1
- data/lib/haml_lint/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e13afbca153d2eb77c44ea3c266bf1a970ef71aa5d8efaa3c956870f69d76e0
|
4
|
+
data.tar.gz: 7b48e11ccc6bec1d6750c5905df9b05b48980163a87c2b00dad45a6364ef35df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17cb994e2f2498745c02b2c584f23b03a81a67fa4f6fb4d1f1b2d9421e4d2426fbe04c39d1d49288d10bf14c7b0dde2d2f2c2dbc991a5e7839f6085438d4984b
|
7
|
+
data.tar.gz: 553834970edaffca09efba96a422ee73d45251a5c48d1e15a01a3cf0184d2d8e90392cd663d4f836e061a7486b061998859032b090c6916a968b66019ac9b581
|
data/config/default.yml
CHANGED
@@ -91,13 +91,16 @@ linters:
|
|
91
91
|
- Lint/BlockAlignment
|
92
92
|
- Lint/EndAlignment
|
93
93
|
- Lint/Void
|
94
|
-
- Layout/AlignHash
|
95
|
-
- Layout/AlignParameters
|
94
|
+
- Layout/AlignHash # renamed to Layout/HashAlignment in rubocop 0.77
|
95
|
+
- Layout/AlignParameters # renamed to Layout/ParameterAlignment in rubocop 0.77
|
96
96
|
- Layout/CaseIndentation
|
97
97
|
- Layout/ElseAlignment
|
98
98
|
- Layout/EndOfLine
|
99
|
+
- Layout/HashAlignment
|
99
100
|
- Layout/IndentationWidth
|
100
|
-
- Layout/
|
101
|
+
- Layout/ParameterAlignment
|
102
|
+
- Layout/TrailingBlankLines # renamed to Layout/TrailingEmptyLines in rubocop 0.77
|
103
|
+
- Layout/TrailingEmptyLines
|
101
104
|
- Layout/TrailingWhitespace
|
102
105
|
- Metrics/BlockLength
|
103
106
|
- Metrics/BlockNesting
|
@@ -40,7 +40,7 @@ module HamlLint
|
|
40
40
|
#
|
41
41
|
# @param patterns [Array<String>]
|
42
42
|
# @return [Array<String>]
|
43
|
-
def extract_files_from(patterns) # rubocop:disable MethodLength
|
43
|
+
def extract_files_from(patterns) # rubocop:disable Metrics/MethodLength
|
44
44
|
files = []
|
45
45
|
|
46
46
|
patterns.each do |pattern|
|
@@ -9,7 +9,7 @@ module HamlLint
|
|
9
9
|
|
10
10
|
ALLOWED_SEPARATORS = [' ', '#'].freeze
|
11
11
|
|
12
|
-
def visit_tag(node) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/
|
12
|
+
def visit_tag(node) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
13
13
|
# If this tag has inline script
|
14
14
|
return unless node.contains_script?
|
15
15
|
|
@@ -35,7 +35,7 @@ module HamlLint
|
|
35
35
|
return unless tree = parse_ruby(script_node.script)
|
36
36
|
%i[str dstr].include?(tree.type) &&
|
37
37
|
!starts_with_reserved_character?(tree.children.first)
|
38
|
-
rescue ::Parser::SyntaxError # rubocop:disable Lint/
|
38
|
+
rescue ::Parser::SyntaxError # rubocop:disable Lint/SuppressedException
|
39
39
|
# Gracefully ignore syntax errors, as that's managed by a different linter
|
40
40
|
end
|
41
41
|
|
data/lib/haml_lint/utils.rb
CHANGED
@@ -66,7 +66,7 @@ module HamlLint
|
|
66
66
|
dumped_interpolated_str = Haml::Util.balance(scan, '{', '}', 1)[0][0...-1]
|
67
67
|
|
68
68
|
# Hacky way to turn a dumped string back into a regular string
|
69
|
-
yield [eval('"' + dumped_interpolated_str + '"'), line] # rubocop:disable Eval
|
69
|
+
yield [eval('"' + dumped_interpolated_str + '"'), line] # rubocop:disable Security/Eval
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
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.34.
|
4
|
+
version: 0.34.1
|
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: 2019-10
|
11
|
+
date: 2019-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: haml
|