slim_lint 0.32.2 → 0.33.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: fd046a032cb7d554e447d0e2ef1a790ff22f163eb734450d330ab1fc769c575b
4
- data.tar.gz: 676860f6eb8fce36a54d82efab06fbf38dab1a68139ce330dbd16b4cdc42d7d5
3
+ metadata.gz: '08768fa2264ad994c53a3e0f993fa0caa38e300c77ae64d5531e972c440aeaaf'
4
+ data.tar.gz: bff84f96661b0c46c2a5445b37da6932b00ee2e2fa56e2ed1e8e76228db98bf5
5
5
  SHA512:
6
- metadata.gz: d81d8c6bcc920c6d3c676da85d87d7c1792468428bfa3045af11bf45222ee70faf12d4d8383e30889453eb0f08d0fce7b43b65cb8ad7c1fadcd0da27ac4262b6
7
- data.tar.gz: 887d73d3cec672e79987668bd733ae90a2c60d505b17ba6a7bcb7cf5ffcd71a43fbc5b501b2d51032945d4612baf7a85d57803a6e07c7c56af0e06f4425558bb
6
+ metadata.gz: 763da1e8ccb05a25e7c54813363fa86ad340d387a3dedf1b3a41ef8f0cada1e413861e7159bda4931bbe45150ae11314c79e51233ac054eb9f7684245d8b0091
7
+ data.tar.gz: a5eb859a052ff7276ecef9718b4a0952aa8ddc77738313a047c67773ae7b1556e49a051f101e30de92014f26e8e894b1733e30eacbe4b28b452c9ea0124226f5
@@ -5,7 +5,8 @@ module SlimLint
5
5
  class Linter::ControlStatementSpacing < Linter
6
6
  include LinterRegistry
7
7
 
8
- MESSAGE = 'Please add a space before and after the `=`'
8
+ MESSAGE_OUTPUT = 'Please add a space before and after the `=`'
9
+ MESSAGE_CONTROL = 'Please add a space after the `-`'
9
10
 
10
11
  on [:html, :tag, anything, [],
11
12
  [:slim, :output, anything, capture(:ruby, anything)]] do |sexp|
@@ -18,7 +19,15 @@ module SlimLint
18
19
 
19
20
  next if line =~ /[^ ] ==?<?>? [^ ]/
20
21
 
21
- report_lint(sexp, MESSAGE)
22
+ report_lint(sexp, MESSAGE_OUTPUT)
23
+ end
24
+
25
+ on [:slim, :control] do |sexp|
26
+ line = document.source_lines[sexp.line - 1]
27
+
28
+ next if line =~ /^ *- [^ ]/
29
+
30
+ report_lint(sexp, MESSAGE_CONTROL)
22
31
  end
23
32
  end
24
33
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the gem version.
4
4
  module SlimLint
5
- VERSION = '0.32.2'
5
+ VERSION = '0.33.0'
6
6
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slim_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.2
4
+ version: 0.33.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane da Silva
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-06 00:00:00.000000000 Z
10
+ date: 2025-04-21 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rexml