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 +4 -4
- data/lib/slim_lint/linter/control_statement_spacing.rb +11 -2
- data/lib/slim_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: '08768fa2264ad994c53a3e0f993fa0caa38e300c77ae64d5531e972c440aeaaf'
|
4
|
+
data.tar.gz: bff84f96661b0c46c2a5445b37da6932b00ee2e2fa56e2ed1e8e76228db98bf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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,
|
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
|
data/lib/slim_lint/version.rb
CHANGED
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.
|
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-
|
10
|
+
date: 2025-04-21 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rexml
|