sqlint 0.0.5 → 0.0.6

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/sqlint +8 -3
  3. data/lib/sqlint/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: efe566a4b8ebe9684a0f16fad5069040ea7c71b3
4
- data.tar.gz: f56d2b20dfa6d9f4615551a4711fa196c4ab11f3
3
+ metadata.gz: d8299d22b3799957a801442f25ecf60c1d3538f3
4
+ data.tar.gz: 7e9564d42eda301285008931947e05cecd399faf
5
5
  SHA512:
6
- metadata.gz: e88ab080386db0601b5bf0b8a146dc0cb7d62faeb927413e92f1b8fa3119f49fa39ab0b27997c66df644734a49e28826c61560001e4c1573c74370882361c715
7
- data.tar.gz: 6bc32615630fc20a39047560cb7752f7d28480dbd392cf388f8d59fee0fe19c298cc6954766fdb274806aad7f3fb1ef2e896d33c691a98ed44cabce5aa8034cc
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.sanitise.split("\n")
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
@@ -1,3 +1,3 @@
1
1
  module SQLint
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Purcell