yaml-lint 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/yaml-lint +1 -1
- data/lib/yaml-lint.rb +7 -6
- 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: fb29aa4e6f0026944a06a820665d65910b2be07a
|
4
|
+
data.tar.gz: f3411164507107cff49cb01a6bfc23a083b0f814
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a77de2bfc721656a70124f97608c4b8350ea2b71a994cf5295666a0d48c2fa1716fbcce7c774f55e7692a3cc6b34b9bb46611b79f64230b78c44b9fecfc6ae67
|
7
|
+
data.tar.gz: e3cbe7d5568dc196c5974b9e5b4f30213595a90fcd1e65949c8814ebeb93fff784520e7377f2b926ae4ca4137d9cb4c254d9a33ac5280d1c58d166031c66cdba
|
data/bin/yaml-lint
CHANGED
data/lib/yaml-lint.rb
CHANGED
@@ -42,14 +42,14 @@ class YamlLint
|
|
42
42
|
unless File.exists? @file
|
43
43
|
error "File #{@file} does not exist"
|
44
44
|
@error = true
|
45
|
-
return
|
46
|
-
end
|
47
|
-
if File.directory? @file
|
48
|
-
self.parse_directory @file
|
49
45
|
else
|
50
|
-
|
46
|
+
if File.directory? @file
|
47
|
+
self.parse_directory @file
|
48
|
+
else
|
49
|
+
self.parse_file @file
|
50
|
+
end
|
51
51
|
end
|
52
|
-
@error
|
52
|
+
@error ? false : true
|
53
53
|
end
|
54
54
|
|
55
55
|
def parse_directory(directory)
|
@@ -67,6 +67,7 @@ class YamlLint
|
|
67
67
|
def parse_file(file)
|
68
68
|
unless File.extname(file) == ".yaml"
|
69
69
|
error "The extension of the file #{file} should be .yaml"
|
70
|
+
@error = true
|
70
71
|
return
|
71
72
|
end
|
72
73
|
begin
|