Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to pg_query 0.9.1, adds PostgreSQL 9.5 syntax support #6

Merged
merged 1 commit into from
Apr 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GEM
specs:
diff-lcs (1.2.5)
json (1.8.3)
pg_query (0.5.0)
pg_query (0.9.1)
json (~> 1.8)
rspec (3.2.0)
rspec-core (~> 3.2.0)
Expand All @@ -27,4 +27,4 @@ DEPENDENCIES
rspec

BUNDLED WITH
1.10.3
1.11.2
4 changes: 3 additions & 1 deletion lib/sqlint/linter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def find_absolute_position(offset)
end

def clean_message(message)
message.gsub(/(?<=at or near ")(.*)(?=")/) { |match| match[0..49] }
message
.gsub(/(?<=at or near ")(.*)(?=")/) { |match| match[0..49] }
.gsub(/\s+\(scan\.l\:\d+\)/, '')
end
end
end
2 changes: 1 addition & 1 deletion sqlint.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |s|
s.rubygems_version = '1.8.23'
s.summary = 'Simple SQL linter.'

s.add_runtime_dependency('pg_query', '~> 0.5')
s.add_runtime_dependency('pg_query', '~> 0.9.1')
s.add_development_dependency('rake', '~> 10.1')
s.add_development_dependency('rspec', '~> 3.2')
s.add_development_dependency('bundler', '~> 1.3')
Expand Down