Skip to content

Commit

Permalink
Add pre-commit integration (#556)
Browse files Browse the repository at this point in the history
This PR introduces direct [pre-commit](https://pre-commit.com/)
compatibility.

Here is an example of how it can be integrated after it will be
integrated:
```
repos:
-   repo: https://github.com/sql-formatter-org/sql-formatter
    rev: ''
    hooks:
    -   id: sql-formatter
```

Right now you need to create a separate repository in order to be able
to integrate with `sql-formatter`.
Like this one: https://github.com/slyapustin/pre-commit-sql-formatter
  • Loading branch information
nene committed Apr 1, 2024
2 parents dd5dd1e + ebc7a43 commit 243a5cb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-hooks.yaml
@@ -0,0 +1,6 @@
- id: sql-formatter
name: sql-formatter
description: "Reformat SQL files with sql-formatter"
entry: sql-formatter --fix
language: node
types: [sql]

0 comments on commit 243a5cb

Please sign in to comment.