slim_lint 0.8.3 → 0.9.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/config/default.yml +3 -0
- data/lib/slim_lint/document.rb +1 -1
- data/lib/slim_lint/linter/tab.rb +17 -0
- data/lib/slim_lint/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b88c33d3d208586c5fe13ae31701e89225353ac1
|
4
|
+
data.tar.gz: 9d05e6492ee5182ecda6684fbd1096cf257a26be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84766cad5ec40037d1c93d1858b8309532a6f0caa3d62f5cccde0fc0e8c65b0c09e52edc664830a895cbe2fb3a809e6513ddeb343f44b6356d1df81f71c613bc
|
7
|
+
data.tar.gz: 1f205711a218c38daf0bec5808c4430464274993304d5c47bc087ff3610fbc9b3fde16387c2867e2ddb2525f41629727bf7e48e5da0abce6e802751d3e82a8d4
|
data/config/default.yml
CHANGED
data/lib/slim_lint/document.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
module SlimLint
|
2
|
+
# Searches for tab indentation
|
3
|
+
class Linter::Tab < Linter
|
4
|
+
include LinterRegistry
|
5
|
+
|
6
|
+
MSG = 'Tab detected'.freeze
|
7
|
+
|
8
|
+
on_start do |_sexp|
|
9
|
+
dummy_node = Struct.new(:line)
|
10
|
+
document.source_lines.each_with_index do |line, index|
|
11
|
+
next unless line =~ /^( *)[\t ]*\t/
|
12
|
+
|
13
|
+
report_lint(dummy_node.new(index + 1), MSG)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/slim_lint/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slim_lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
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: 2016-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slim
|
@@ -135,6 +135,7 @@ files:
|
|
135
135
|
- lib/slim_lint/linter/line_length.rb
|
136
136
|
- lib/slim_lint/linter/redundant_div.rb
|
137
137
|
- lib/slim_lint/linter/rubocop.rb
|
138
|
+
- lib/slim_lint/linter/tab.rb
|
138
139
|
- lib/slim_lint/linter/tag_case.rb
|
139
140
|
- lib/slim_lint/linter/trailing_whitespace.rb
|
140
141
|
- lib/slim_lint/linter_registry.rb
|