sqlint 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/sqlint +8 -3
- data/lib/sqlint/version.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: d8299d22b3799957a801442f25ecf60c1d3538f3
|
4
|
+
data.tar.gz: 7e9564d42eda301285008931947e05cecd399faf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aaddf95c7506f3b00e436d888d9e11244e410b55947597b14e3ed56c08fea4ffae2f8edf25742cf51736389be24adc9f46286b6c5b918f779106618aa6acdfb
|
7
|
+
data.tar.gz: c6e5b3086494649f56859029f111ada4e58fee9588a425c3c11dd27d30891be230b5a1ade6ff9cac871d5176eb4a7fc1d141d280e46d0e1324dfcf4e278d71f5
|
data/bin/sqlint
CHANGED
@@ -29,20 +29,25 @@ class String
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
saw_errors = false
|
32
33
|
ARGV.each do |filename|
|
33
34
|
File.open(filename, 'r') do |file|
|
34
35
|
results = SQLint::Linter.new(filename, file).run
|
35
36
|
results.each do |lint|
|
36
|
-
message_lines = lint.message.
|
37
|
+
message_lines = lint.message.split("\n")
|
37
38
|
puts [
|
38
39
|
lint.filename,
|
39
40
|
lint.line,
|
40
41
|
lint.column,
|
41
|
-
ERROR_TYPES[lint.type] + " " + message_lines.shift
|
42
|
+
ERROR_TYPES[lint.type] + " " + message_lines.shift.sanitise
|
42
43
|
].join(":")
|
43
44
|
message_lines.each do |line|
|
44
|
-
puts " " + line
|
45
|
+
puts " " + line.sanitise
|
45
46
|
end
|
47
|
+
|
48
|
+
saw_errors ||= (lint.type == :error)
|
46
49
|
end
|
47
50
|
end
|
48
51
|
end
|
52
|
+
|
53
|
+
exit 1 if saw_errors
|
data/lib/sqlint/version.rb
CHANGED