NEW  New: cqlint (lint + format), cql-migrate and cqlprof → see the benchmarks

cqlint

Format CQL and catch the statements that hurt at scale, in milliseconds. Built on the lexer of cqlc.

$ cargo install cqlint
Format

One layout, safe by construction

Before

any style

select id,name from ks.users where id = ? and name > 'a' order by name desc limit 10;

After

keywords, clauses, wrapping, comments kept

SELECT id, name
FROM ks.users
WHERE id = ?
  AND name > 'a'
ORDER BY name DESC
LIMIT 10;

Safety net

tokens and comments must be unchanged

100 %idempotent
Checked on real KillrVideo and cqlc files; if the token stream would change, the file is left alone.
Lint

13 rules for CQL that does not scale

Rules

red = warning, white = note, blue = fixable

allow-filteringselect-starunbounded-selectcount-scanlarge-inlarge-batchnative-secondary-indexlightweight-transactiondestructivenon-idempotent-ddl (fixable)list-columnnull-writewide-table

Type-aware

--schema schema/ adds cqlc-core checks

statementfrom your .cql
→
schemaunknown column, type mismatch, missing partition key
Speed

3,600 files in a quarter of a second

0.24 s
lint, 3,600 files, 23 MB
0.53 s
format check, same files
330k
statements per second, lint
8 cores
Apple M3, rayon
CI

Three lines

# .github/workflows
- run: cargo install cqlint
- run: cqlint format --check .
- run: cqlint check --output-format github .