joereynolds/sql-lint
joereynolds/sql-lint has 462 GitHub stars and 44 forks. Star changes are not measured yet. Last checked 2026-11-09 05:07 UTC. Last push 2025-06-03.
An SQL linter
측정된 스타 증가
- in 24h
- 기록 수집 중
- in 7 days
- 기록 수집 중
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalsql-lint
sql-lint will do sanity checks on your queries as well as bring errors back from the DB.
If you worry about forgetting WHEREs on a DELETE or borking your data with unexpected characters, then sql-lint is for you.
Read the documentation for a complete walkthrough


Installation
npm i -g sql-lint
# or
yarn global add sql-lint
Or download a binary
Usage
sql-lint works on files, directories and stdin.
# Will lint all .sql files recursively from the current directory
sql-lint .
# Lints the create-person.sql file
sql-lint create-person.sql
# Lints stdin
echo 'DELETE FROM person;' | sql-lint
Programmatically
sql-lint can also be used within your js/ts files (though admittedly it's stronger as a cli command).
npm i sql-lint
# or
yarn add sql-lint
import sqlLint from 'sql-lint'
// using async/await
const errors = await sqlLint({
sql: 'SELECT my_column FROM my_table',
})
// or using promise
sqlLint({ sql: 'SELECT my_column FROM my_table' }).then(errors => {
for (const error of errors) {
// do something
}
})
Supported Editors
If your editor supports external tools, then it supports sql-lint.
Below is the list that have direct support for sql-lint either through plugins or configuration.
| Editor | Plugin |
|---|---|
| Neovim | Ale |
| Vim | Ale |
| VS Code | Inline SQL |
Checks
A quick rundown of the checks is below but you should read the documentation for an exhaustive list.
sql-lint comes with its own suite of checks. It
also returns any errors from the SQL server you have connected to. Generally
you'll find that the errors from sql-lint are more informative than those from
the server. That said, you will still want errors from the server as it covers
more cases and will catch things that sql-lint does not.
unmatched-parentheses
Shown when a query has an unbalanced amount of parentheses.
test/test-files//test.sql:16 [sql-lint: unmatched-parentheses] Unmatched parentheses.
missing-where
Shown when a DELETE statement is missing a WHERE clause.
test/test-files/test.sql:20 [sql-lint: missing-where] DELETE statement missing WHERE clause.
invalid-drop-option
Shown when an invalid option is given to the DROP statement.
test/test-files/test.sql:22 [sql-lint: invalid-drop-option] Option 'thing' is not a valid option, must be one of '["database","event","function","index","logfile","procedure","schema","server","table","view","tablespace","trigger"]'.
invalid-create-option
Shown when an invalid option is given to the CREATE statement.
:24 [sql-lint: invalid-create-option] Option 'test' is not a valid option, must be one of '["algorithm","database","definer","event","function","index","or","procedure","server","table","tablespace","temporary","trigger","user","unique","view"]'.
invalid-truncate-option
Shown when an invalid option is given to the TRUNCATE statement.
test/test-files/test.sql:26 [sql-lint: invalid-truncate-option] Option 'something' is not a valid option, must be one of '["table"]'.
invalid-alter-option
Shown when an invalid option is given to the ALTER statement.
test/test-files/test.sql:28 [sql-lint: invalid-alter-option] Option 'mlady' is not a valid option, must be one of '["column","online","offline","ignore","database","event","function","procedure","server","table","tablespace","view"]'.
odd-code-point
Shown when there are unsupported/unusual* code points in your code.
*This check came about whilst working Microsoft Excel. Microsoft likes to add a lot of zany characters which can subtly break your data without you realising.
test/test-files//test.sql:30 [sql-lint: odd-code-point] Unexpected code point.
invalid-limit-quantifier
Shown when you specify something other than a number to the LIMIT statement.
test/test-files//test.sql:32 [sql-lint: invalid-limit-quantifier] Argument 'test' is not a valid quantifier for LIMIT clause.
hungarian-notation
Shown when the string sp_ or tbl_ is present in the query.
test/test-files/test.sql:34 [sql-lint: hungarian-notation] Hungarian notation present in query
trailing-whitespace
Shown when a query has trailing whitespace.
test/test-files/test.sql:34 [sql-lint: trailing-whitespace] Trailing whitespace
Documentation
To find out more, read the documentation
관련 프로젝트 살펴보기
Asabeneh/30-Days-Of-Python
30 Days of Python 프로그래밍 챌린지는 Python 프로그래밍 언어를 30일 동안 배우기 위한 단계별 가이드입니다. 이 챌린지는 100일 이상 걸릴 수 있습니다. 자신의 속도에 맞춰 진행하세요. 다음 동영상도 도움이 될 수 있습니다: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,423 스타grafana/grafana
개방적이고 조합 가능한 옵저버빌리티 및 데이터 시각화 플랫폼입니다. Prometheus, Loki, Elasticsearch, InfluxDB, Postgres 등 여러 소스의 메트릭, 로그, 트레이스를 시각화합니다.
77,763 스타redis/redis
실시간 데이터 기반 애플리케이션을 구축하는 개발자에게 Redis는 가장 선호되고, 가장 빠르며, 기능이 가장 풍부한 캐시, 데이터 구조 서버이자 문서 및 벡터 쿼리 엔진입니다.
77,309 스타apache/superset
Apache Superset는 데이터 시각화 및 데이터 탐색 플랫폼입니다.
75,453 스타