Skip to content

Commit 2c95a1f

Browse files
committed
Use sqlfluff as SQL linter
1 parent 930cce3 commit 2c95a1f

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

.github/workflows/code_layout.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ jobs:
1919
run: clang-format --dry-run --Werror -style=file pgsql/*.c pgsql/*.h lib/*.c lib/*.cpp lib/*.hpp lib/*.h lib/cunit/*.c lib/cunit/*.h
2020
sql_code_layout:
2121
name: SQL linter
22-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-22.04
2323
steps:
24-
- name: Install nvm
25-
uses: actions/setup-node@v1
24+
- name: Checkout code
25+
uses: actions/checkout@v3
26+
- name: Set up Python 3.10
27+
uses: actions/setup-python@v4
2628
with:
27-
node-version: '8'
28-
- name: Linter
29+
python-version: '3.10'
30+
- name: Install SQLFluff
31+
run: |
32+
pip install sqlfluff
33+
- name: Run SQLFluff lint
2934
run: |
30-
npm install -g eclint@1.1.5
31-
eclint check * */* */cunit/*
35+
sqlfluff lint ./pgsql/pointcloud.sql.in
36+
sqlfluff lint ./pgsql_postgis/pointcloud_postgis.sql.in

doc/development.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ and with various PostgreSQL/PostGIS releases:
164164

165165
.. |16_33_jammy| image:: https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres16_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu :target: https://github.com/pgpointcloud/pointcloud/actions?query=workflow%3A%22%5Bubuntu-22.04%5D+PostgreSQL+16+and+PostGIS+3.3%22
166166

167-
.. |13_33_noble| image:: https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres13_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu :target: https://github.com/pgpointcloud/pointcloud/actions?query=workflow%3A%22%5Bubuntu-24.04%5D+PostgreSQL+13+and+PostGIS+3.3%22
167+
.. |13_33_noble| image:: https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres13_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu :target: https://github.com/pgpointcloud/pointcloud/actions?query=workflow%3A%22%5Bubuntu-24.04%5D+PostgreSQL+13+and+PostGIS+3.3%22
168168

169-
.. |14_33_noble| image:: https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres14_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu :target: https://github.com/pgpointcloud/pointcloud/actions?query=workflow%3A%22%5Bubuntu-24.04%5D+PostgreSQL+14+and+PostGIS+3.3%22
169+
.. |14_33_noble| image:: https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres14_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu :target: https://github.com/pgpointcloud/pointcloud/actions?query=workflow%3A%22%5Bubuntu-24.04%5D+PostgreSQL+14+and+PostGIS+3.3%22
170170

171171
.. |15_33_noble| image:: https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres15_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu :target: https://github.com/pgpointcloud/pointcloud/actions?query=workflow%3A%22%5Bubuntu-24.04%5D+PostgreSQL+15+and+PostGIS+3.3%22
172172

0 commit comments

Comments
 (0)