Docs for TrueQuery 0.1.6View as Markdown
pre-commit
Add TrueQuery to .pre-commit-config.yaml:
repos:
- repo: https://github.com/Analytically-ai/truequery
rev: v0.1.6
hooks:
- id: truequerytruequery runs truequery detect on staged .sql files. To check both .sql and .py files (for SQL inside Python files, such as Airflow DAGs and scripts, and for pandas code), use truequery-python:
repos:
- repo: https://github.com/Analytically-ai/truequery
rev: v0.1.6
hooks:
- id: truequery-pythonExit codes in pre-commit#
0: every staged file was checked and had no findings at or above--fail-on(defaulterror).1: findings at or above--fail-on.2: usage or configuration error.3: no findings at or above--fail-on, but at least one file could not be checked (unparseable SQL, procedural blocks such as PL/pgSQL orBEGIN … END, undecodable text, or files over the 10 MB limit). Passingargs: [--allow-unverified]turns exit code3into0so pre-commit only blocks commits on verified findings.