This commit is contained in:
bluxmit 2022-05-08 21:54:27 +00:00
commit 00ce360e08
2 changed files with 39 additions and 20 deletions

View file

@ -176,6 +176,9 @@ RUN echo "------------------------------------------------------ postgres" \
&& cd /tmp && wget https://github.com/kaishuu0123/erd-go/releases/download/v2.0.0/linux_amd64_erd-go \
&& chmod +x /tmp/linux_amd64_erd-go \
&& mv /tmp/linux_amd64_erd-go /usr/bin/erd-go \
&& cd /tmp && wget https://github.com/kaishuu0123/erd-go/releases/download/v2.0.0/linux_amd64_erd-go \
&& echo "------------------------------------------------------ sqlfluff" \
&& pip install sqlfluff==0.9.4 \
# && echo "------------------------------------------------------ utils" \
# && rm -rf /home/abc/utils || true \
# && git clone https://github.com/bluxmit/alnoda-workspaces /tmp/alnoda-workspaces \
@ -203,5 +206,3 @@ RUN echo "------------------------------------------------------ postgres" \
COPY dbdesigner/startUp.js /opt/dbdesigner/dist/startUp.js
USER abc

View file

@ -597,6 +597,24 @@ Convenient SQL for monitoring Postgres database health. Clone repo and use it to
```
git clone https://github.com/lob/pg_insights /home/pg_insights
```
### sqlfluff
[Sqlfluff](https://www.sqlfluff.com/) is a moduler sql linter for humans.
```
echo "select * from t where id=1" >/tmp/test.sql
sqlfluff lint /tmp/test.sql
```
Results in:
```
== [/tmp/test.sql] FAIL
L: 1 | P: 1 | L044 | Query produces an unknown number of result columns.
L: 1 | P: 27 | L006 | Missing whitespace before =
L: 1 | P: 27 | L006 | Missing whitespace after =
```
## Contribution
Any contribution is welcome! If you believe some tool should be added, feel free to create a pull request.