puppet-lint-strict_indent-check 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/lib/puppet-lint/plugins/check_strict_indent.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8324391476697257f038a0e343dbc2156914a594
|
4
|
+
data.tar.gz: ee31978ca8e9d3cc4cfed3b852ad3f2b5205a3b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2fbb0796d73e9f920d7002c33c0725ccd3176243d7ef311305e02cce3e566a1472114eac422230aa98bc0fb46c070a9348978b935e9f2164dc487fa313c1a77
|
7
|
+
data.tar.gz: 5b66a8d938e9d4042039e8432956f529679730427bbff07c2ab97f14569ce4ae910a141e74a385177dfb5c47b16b3b506878631d1b41a2887f92c94eb55c76cf
|
data/README.md
CHANGED
@@ -40,5 +40,6 @@ Acceptable Identation
|
|
40
40
|
* indent should decrease by one step the line of the end of a resource due to right curly brace, if it was indented for resource title, and not ended by a semicolon.
|
41
41
|
* indent should increase by one step the line after an equals `=` or farrow `=>` that ends a line, but only for that one line.
|
42
42
|
|
43
|
-
see `spec/fixtures/pass/` for good indentation examples
|
44
|
-
|
43
|
+
see `spec/fixtures/pass/` for good indentation examples.
|
44
|
+
|
45
|
+
see `spec/fixtures/fail/` for bad indentation examples.
|
@@ -15,7 +15,7 @@ PuppetLint.new_check(:'strict_indent') do
|
|
15
15
|
if [:LBRACE, :LBRACK, :LPAREN].include?(token.type)
|
16
16
|
open[token.type] << token
|
17
17
|
elsif [:RBRACE, :RBRACK, :RPAREN].include?(token.type)
|
18
|
-
match = open[("L" + token.type[1..-1]).to_sym].pop
|
18
|
+
match = open[("L" + token.type.to_s[1..-1]).to_sym].pop
|
19
19
|
if not match.nil?
|
20
20
|
matches[token] = match
|
21
21
|
matches[match] = token
|