haml_lint 0.65.1 → 0.67.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 +4 -4
 - data/lib/haml_lint/adapter.rb +2 -1
 - data/lib/haml_lint/linter/classes_before_ids.rb +0 -6
 - data/lib/haml_lint/linter/instance_variables.rb +1 -1
 - data/lib/haml_lint/linter/multiline_pipe.rb +2 -2
 - data/lib/haml_lint/linter/strict_locals.rb +1 -1
 - data/lib/haml_lint/version.rb +1 -1
 - metadata +6 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: fcdf3b3475532d50ca5d1d035130d64e8e01d842d117e81eb1f2a499f340e5df
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 91c89bb18013dbff21e2f2dc622803d6a2dcd1f9bace430cdd53d1ca891a165b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 30cb36c09589c23dc96280abd0f44c26bdbd185f2661ac0f5d78912dcae0514138c651a81ab4e0bd72428e99bd956af935da1e99388cd11b22575750f728ebcb
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 90fedf740e9789e00f7944b53ecb1c75b0d358ca1375294eb9922901ca4adb0318897b00de5a25d594579c723ba55cb93bdc6d793143865f4d31d4a775a687eb
         
     | 
    
        data/lib/haml_lint/adapter.rb
    CHANGED
    
    | 
         @@ -19,7 +19,8 @@ module HamlLint 
     | 
|
| 
       19 
19 
     | 
    
         
             
                  version = haml_version
         
     | 
| 
       20 
20 
     | 
    
         
             
                  case version
         
     | 
| 
       21 
21 
     | 
    
         
             
                  when '~> 5.0', '~> 5.1', '~> 5.2' then HamlLint::Adapter::Haml5
         
     | 
| 
       22 
     | 
    
         
            -
                  when '~> 6.0', '~> 6.0.a', '~> 6.1', '~> 6.2', '~> 6.3' then HamlLint::Adapter::Haml6
         
     | 
| 
      
 22 
     | 
    
         
            +
                  when '~> 6.0', '~> 6.0.a', '~> 6.1', '~> 6.2', '~> 6.3', '~> 6.4' then HamlLint::Adapter::Haml6
         
     | 
| 
      
 23 
     | 
    
         
            +
                  when '~> 7.0' then HamlLint::Adapter::Haml6
         
     | 
| 
       23 
24 
     | 
    
         
             
                  else fail HamlLint::Exceptions::UnknownHamlVersion, "Cannot handle Haml version: #{version}"
         
     | 
| 
       24 
25 
     | 
    
         
             
                  end
         
     | 
| 
       25 
26 
     | 
    
         
             
                end
         
     | 
| 
         @@ -5,12 +5,6 @@ module HamlLint 
     | 
|
| 
       5 
5 
     | 
    
         
             
              class Linter::ClassesBeforeIds < Linter
         
     | 
| 
       6 
6 
     | 
    
         
             
                include LinterRegistry
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
                # Map of prefixes to the type of tag component
         
     | 
| 
       9 
     | 
    
         
            -
                TYPES_BY_PREFIX = {
         
     | 
| 
       10 
     | 
    
         
            -
                  '.' => :class,
         
     | 
| 
       11 
     | 
    
         
            -
                  '#' => :id,
         
     | 
| 
       12 
     | 
    
         
            -
                }.freeze
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
8 
     | 
    
         
             
                MSG = '%s should be listed before %s (%s should precede %s)'
         
     | 
| 
       15 
9 
     | 
    
         | 
| 
       16 
10 
     | 
    
         
             
                def visit_tag(node)
         
     | 
| 
         @@ -10,7 +10,7 @@ module HamlLint 
     | 
|
| 
       10 
10 
     | 
    
         
             
                # @param [HamlLint::Tree::RootNode] the root of a syntax tree
         
     | 
| 
       11 
11 
     | 
    
         
             
                # @return [true, false] whether the linter is enabled for the tree
         
     | 
| 
       12 
12 
     | 
    
         
             
                def visit_root(node)
         
     | 
| 
       13 
     | 
    
         
            -
                  @enabled = matcher.match(File.basename(node.file)) 
     | 
| 
      
 13 
     | 
    
         
            +
                  @enabled = matcher.match?(File.basename(node.file))
         
     | 
| 
       14 
14 
     | 
    
         
             
                end
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
                # Checks for instance variables in script nodes when the linter is enabled.
         
     | 
| 
         @@ -26,7 +26,7 @@ module HamlLint 
     | 
|
| 
       26 
26 
     | 
    
         
             
                  # Plain text nodes are allowed to consist of a single pipe
         
     | 
| 
       27 
27 
     | 
    
         
             
                  return if line.strip == '|'
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
       29 
     | 
    
         
            -
                  record_lint(node, MESSAGE) if line.match(MULTILINE_PIPE_REGEX)
         
     | 
| 
      
 29 
     | 
    
         
            +
                  record_lint(node, MESSAGE) if line.match?(MULTILINE_PIPE_REGEX)
         
     | 
| 
       30 
30 
     | 
    
         
             
                end
         
     | 
| 
       31 
31 
     | 
    
         | 
| 
       32 
32 
     | 
    
         
             
                private
         
     | 
| 
         @@ -39,7 +39,7 @@ module HamlLint 
     | 
|
| 
       39 
39 
     | 
    
         | 
| 
       40 
40 
     | 
    
         
             
                def check(node)
         
     | 
| 
       41 
41 
     | 
    
         
             
                  line = line_text_for_node(node)
         
     | 
| 
       42 
     | 
    
         
            -
                  record_lint(node, MESSAGE) if line.match(MULTILINE_PIPE_REGEX)
         
     | 
| 
      
 42 
     | 
    
         
            +
                  record_lint(node, MESSAGE) if line.match?(MULTILINE_PIPE_REGEX)
         
     | 
| 
       43 
43 
     | 
    
         
             
                end
         
     | 
| 
       44 
44 
     | 
    
         
             
              end
         
     | 
| 
       45 
45 
     | 
    
         
             
            end
         
     | 
| 
         @@ -35,7 +35,7 @@ module HamlLint 
     | 
|
| 
       35 
35 
     | 
    
         
             
                # @api private
         
     | 
| 
       36 
36 
     | 
    
         
             
                # @return [true, false]
         
     | 
| 
       37 
37 
     | 
    
         
             
                def enabled?(root)
         
     | 
| 
       38 
     | 
    
         
            -
                  return false unless matcher.match(File.basename(root.file))
         
     | 
| 
      
 38 
     | 
    
         
            +
                  return false unless matcher.match?(File.basename(root.file))
         
     | 
| 
       39 
39 
     | 
    
         | 
| 
       40 
40 
     | 
    
         
             
                  # This linter can also be disabled by a comment at the top of the file
         
     | 
| 
       41 
41 
     | 
    
         
             
                  first_child = root.children.first
         
     | 
    
        data/lib/haml_lint/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,13 +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.67.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Shane da Silva
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
       8 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       9 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       10 
     | 
    
         
            -
            date: 2025- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2025-10-29 00:00:00.000000000 Z
         
     | 
| 
       11 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       12 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       13 
14 
     | 
    
         
             
              name: haml
         
     | 
| 
         @@ -201,6 +202,7 @@ homepage: https://github.com/sds/haml-lint 
     | 
|
| 
       201 
202 
     | 
    
         
             
            licenses:
         
     | 
| 
       202 
203 
     | 
    
         
             
            - MIT
         
     | 
| 
       203 
204 
     | 
    
         
             
            metadata: {}
         
     | 
| 
      
 205 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
       204 
206 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       205 
207 
     | 
    
         
             
            require_paths:
         
     | 
| 
       206 
208 
     | 
    
         
             
            - lib
         
     | 
| 
         @@ -215,7 +217,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       215 
217 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       216 
218 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       217 
219 
     | 
    
         
             
            requirements: []
         
     | 
| 
       218 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 220 
     | 
    
         
            +
            rubygems_version: 3.0.3.1
         
     | 
| 
      
 221 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
       219 
222 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       220 
223 
     | 
    
         
             
            summary: HAML lint tool
         
     | 
| 
       221 
224 
     | 
    
         
             
            test_files: []
         
     |