haml_lint 0.34.0 → 0.34.1

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: ec144420e79ce50d60ef7cb159e51c33d6cd3d59a0dea8034a049c43f25ae189
4
- data.tar.gz: 1cff96bc9d0f2a77f4beaca14a872c56074a3aad5bf91785b711e55ed58c0f92
3
+ metadata.gz: 2e13afbca153d2eb77c44ea3c266bf1a970ef71aa5d8efaa3c956870f69d76e0
4
+ data.tar.gz: 7b48e11ccc6bec1d6750c5905df9b05b48980163a87c2b00dad45a6364ef35df
5
5
  SHA512:
6
- metadata.gz: 04ad57edca1e5b50a0206832bfd83bb8c482255b14a066389a98ac10163863adda72b66a0b97223a68fe8dea4104a7ad71420aa1b318823fa15bf3932273bfa6
7
- data.tar.gz: b34d5ac36b8b4cbba5b76982731af8f2b4d55cbcc01105144f1a6a8cb3fe9d2dd218bdb624940c5c2e767f11552891885380bdedabcb719685053f622bffe865
6
+ metadata.gz: 17cb994e2f2498745c02b2c584f23b03a81a67fa4f6fb4d1f1b2d9421e4d2426fbe04c39d1d49288d10bf14c7b0dde2d2f2c2dbc991a5e7839f6085438d4984b
7
+ data.tar.gz: 553834970edaffca09efba96a422ee73d45251a5c48d1e15a01a3cf0184d2d8e90392cd663d4f836e061a7486b061998859032b090c6916a968b66019ac9b581
@@ -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/TrailingBlankLines
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|
@@ -17,7 +17,7 @@ module HamlLint
17
17
 
18
18
  nodes = (id_map[id] << node)
19
19
  case nodes.size
20
- when 1 then return
20
+ when 1 then nil
21
21
  when 2 then add_lints_for_first_duplications(nodes)
22
22
  else add_lint(node, id)
23
23
  end
@@ -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/LineLength, Metrics/PerceivedComplexity
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/HandleExceptions
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
 
@@ -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
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the gem version.
4
4
  module HamlLint
5
- VERSION = '0.34.0'
5
+ VERSION = '0.34.1'
6
6
  end
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.0
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-02 00:00:00.000000000 Z
11
+ date: 2019-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: haml