sqlint 0.1.8 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0e88bf83bfd2307a0d0ca63de25de94e03e5a9e1
4
- data.tar.gz: 728b779650035b8cf1e43aec0fd35b24926fff42
2
+ SHA256:
3
+ metadata.gz: 9ee6aa32d91abf5ecdce2211fab97d20b56a3c6a770075ea6cf0ee4b86bdd0cc
4
+ data.tar.gz: bf54f99bbd82e7fa7b69652821003a1ce5f3d3ef13bc93f1de9b49c1c30ff1fe
5
5
  SHA512:
6
- metadata.gz: 707a60be6e2a6603c20930b910c14400381aa5ea04633e8428180f5277724922c0edac4a215033de316d91f1754de0fcb5f1d713f6ffedecedd5c53ab611e1b7
7
- data.tar.gz: d41231e5469516c3ca940e73c9642bd78c90c7b2e6c9eadae1a96f2858be3fab844319069061481c18ca953887549d7d5a70a669d91b5781c3b6a49c5fb4c398
6
+ metadata.gz: 9ffefbff8072ad647204487b1f81d6486857755699c3559fdff8dd47f6a2b38d53a73ded767de0bb029c1aab4ede6008e49976c13a9675a7db3eaa6f326bdefd
7
+ data.tar.gz: 5b22d98212352de7816c313449776911a936e61d46e22d0b5aa2a7cb8cf25e6af4833483df8ab4ab18c70a48199d79b56d204d5e743da69d4870a57d8c6d646e
@@ -0,0 +1 @@
1
+ patreon: sanityinc
@@ -0,0 +1,18 @@
1
+ name: CI
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ strategy:
6
+ fail-fast: false
7
+ matrix:
8
+ os: [ubuntu-latest]
9
+ # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
10
+ ruby: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0']
11
+ runs-on: ${{ matrix.os }}
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: ${{ matrix.ruby }}
17
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
18
+ - run: bundle exec rake
@@ -0,0 +1,7 @@
1
+ ---
2
+ - id: sqlint
3
+ name: sqlint
4
+ entry: sqlint
5
+ language: ruby
6
+ minimum_pre_commit_version: 0.15.0
7
+ types: [sql]
data/Gemfile.lock CHANGED
@@ -1,28 +1,32 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- diff-lcs (1.3)
5
- pg_query (1.0.2)
6
- rspec (3.7.0)
7
- rspec-core (~> 3.7.0)
8
- rspec-expectations (~> 3.7.0)
9
- rspec-mocks (~> 3.7.0)
10
- rspec-core (3.7.1)
11
- rspec-support (~> 3.7.0)
12
- rspec-expectations (3.7.0)
4
+ diff-lcs (1.5.0)
5
+ google-protobuf (3.19.4)
6
+ pg_query (2.1.3)
7
+ google-protobuf (>= 3.19.2)
8
+ rake (13.0.6)
9
+ rspec (3.10.0)
10
+ rspec-core (~> 3.10.0)
11
+ rspec-expectations (~> 3.10.0)
12
+ rspec-mocks (~> 3.10.0)
13
+ rspec-core (3.10.2)
14
+ rspec-support (~> 3.10.0)
15
+ rspec-expectations (3.10.2)
13
16
  diff-lcs (>= 1.2.0, < 2.0)
14
- rspec-support (~> 3.7.0)
15
- rspec-mocks (3.7.0)
17
+ rspec-support (~> 3.10.0)
18
+ rspec-mocks (3.10.3)
16
19
  diff-lcs (>= 1.2.0, < 2.0)
17
- rspec-support (~> 3.7.0)
18
- rspec-support (3.7.1)
20
+ rspec-support (~> 3.10.0)
21
+ rspec-support (3.10.3)
19
22
 
20
23
  PLATFORMS
21
24
  ruby
22
25
 
23
26
  DEPENDENCIES
24
- pg_query
27
+ pg_query (>= 1.0, < 3)
28
+ rake
25
29
  rspec
26
30
 
27
31
  BUNDLED WITH
28
- 1.14.6
32
+ 2.2.24
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/purcell/sqlint.svg?branch=master)](https://travis-ci.org/purcell/sqlint)
1
+ [![Build Status](https://github.com/purcell/sqlint/workflows/CI/badge.svg)](https://github.com/purcell/sqlint/actions)
2
2
  [ ![](https://img.shields.io/gem/v/sqlint.svg)](https://rubygems.org/gems/sqlint)
3
3
  [ ![](https://img.shields.io/gem/dt/sqlint.svg)](https://rubygems.org/gems/sqlint)
4
4
  <a href="https://www.patreon.com/sanityinc"><img alt="Support me" src="https://img.shields.io/badge/Support%20Me-%F0%9F%92%97-ff69b4.svg"></a>
@@ -11,8 +11,8 @@ SQLint is a simple command-line linter which reads your SQL files and
11
11
  reports any syntax errors or warnings it finds.
12
12
 
13
13
  At this stage, SQLint checks SQL against the ANSI syntax, and uses the
14
- PostgreSQL SQL parser to achieve this. In time, we hope to add support
15
- for non-standard SQL variants (e.g. MySQL). Contributions are welcome.
14
+ PostgreSQL SQL parser to achieve this. SQLint does not have support
15
+ for non-standard SQL variants (e.g. MySQL), but contributions are welcome.
16
16
 
17
17
  ### Installation
18
18
 
@@ -30,23 +30,46 @@ To check the syntax of a file containing SQL, simply pass the filename to `sqlin
30
30
  sqlint filename.sql
31
31
  ```
32
32
 
33
+ In the absence of a filename, `sqlint` reads from standard input.
34
+
33
35
  ### Editor plugins
34
36
 
35
37
  Support for `sqlint` is provided for the following editors:
36
38
 
37
39
  - Emacs, via [Flycheck](https://github.com/flycheck/flycheck)
38
- - VIM, via [Syntastic](https://github.com/scrooloose/syntastic) or [Neomake](https://github.com/neomake/neomake)
40
+ - VIM, via [Syntastic](https://github.com/scrooloose/syntastic), [Neomake](https://github.com/neomake/neomake) or [ALE](https://github.com/w0rp/ale)
39
41
  - SublimeText, via [SublimeLinter](https://github.com/SublimeLinter/SublimeLinter3/)
40
42
 
43
+
44
+ ### Using with pre-commit
45
+
46
+ Add this to your `.pre-commit-hooks.yaml`:
47
+
48
+ ```yaml
49
+ - repo: https://github.com/purcell/sqlint
50
+ rev: master
51
+ hooks:
52
+ - id: sqlint
53
+ ```
54
+
41
55
  ### Authors
42
56
 
43
57
  This software was written by
44
58
  [Steve Purcell](https://github.com/purcell) and
45
- [Kieran Trezona-le Comte](https://github.com/trezona-lecomte) with the
46
- support of our awesome employer
47
- [Powershop](http://www.powershop.co.nz/), who have other cool stuff
48
- [here on Github](https://github.com/powershop).
59
+ [Kieran Trezona-le Comte](https://github.com/trezona-lecomte).
49
60
 
50
61
  ### License and copyright
51
62
 
52
- Copyright Powershop NZ Ltd. MIT license.
63
+ Copyright 2015-2018 Powershop NZ Ltd.
64
+ Copyright 2018-2021 Steve Purcell.
65
+ MIT license.
66
+
67
+ <hr>
68
+
69
+ [💝 Support this project and my other Open Source work via Patreon](https://www.patreon.com/sanityinc)
70
+
71
+ [💼 LinkedIn profile](https://uk.linkedin.com/in/stevepurcell)
72
+
73
+ [✍ sanityinc.com](http://www.sanityinc.com/)
74
+
75
+ [🐦 @sanityinc](https://twitter.com/sanityinc)
@@ -1,3 +1,3 @@
1
1
  module SQLint
2
- VERSION = "0.1.8"
2
+ VERSION = "0.2.1"
3
3
  end
data/sqlint.gemspec CHANGED
@@ -36,8 +36,8 @@ Gem::Specification.new do |s|
36
36
  s.rubygems_version = '1.8.23'
37
37
  s.summary = 'Simple SQL linter.'
38
38
 
39
- s.add_runtime_dependency('pg_query', '~> 1.0.2')
40
- s.add_development_dependency('rake', '~> 10.1')
39
+ s.add_runtime_dependency('pg_query', '~> 2')
40
+ s.add_development_dependency('rake', '>= 12.3.3')
41
41
  s.add_development_dependency('rspec', '~> 3.2')
42
- s.add_development_dependency('bundler', '~> 1.3')
42
+ s.add_development_dependency('bundler', '>= 2.2.33')
43
43
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Purcell
8
8
  - Kieran Trezona-le Comte
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-06-23 00:00:00.000000000 Z
12
+ date: 1980-01-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pg_query
@@ -17,28 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 1.0.2
20
+ version: '2'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 1.0.2
27
+ version: '2'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: '10.1'
34
+ version: 12.3.3
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: '10.1'
41
+ version: 12.3.3
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -57,18 +57,17 @@ dependencies:
57
57
  name: bundler
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: '1.3'
62
+ version: 2.2.33
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: '1.3'
70
- description: |2
71
- Simple SQL linter.
69
+ version: 2.2.33
70
+ description: " Simple SQL linter.\n"
72
71
  email: steve@sanityinc.com
73
72
  executables:
74
73
  - sqlint
@@ -77,6 +76,9 @@ extra_rdoc_files:
77
76
  - LICENSE.txt
78
77
  - README.md
79
78
  files:
79
+ - ".github/FUNDING.yml"
80
+ - ".github/workflows/ci.yml"
81
+ - ".pre-commit-hooks.yaml"
80
82
  - Gemfile.lock
81
83
  - LICENSE.txt
82
84
  - Makefile
@@ -91,7 +93,7 @@ homepage: https://github.com/purcell/sqlint
91
93
  licenses:
92
94
  - MIT
93
95
  metadata: {}
94
- post_install_message:
96
+ post_install_message:
95
97
  rdoc_options: []
96
98
  require_paths:
97
99
  - lib
@@ -106,9 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
108
  - !ruby/object:Gem::Version
107
109
  version: '0'
108
110
  requirements: []
109
- rubyforge_project:
110
- rubygems_version: 2.4.5.2
111
- signing_key:
111
+ rubygems_version: 3.2.26
112
+ signing_key:
112
113
  specification_version: 4
113
114
  summary: Simple SQL linter.
114
115
  test_files: []