Skip to content

Commit 24e0cb1

Browse files
authored
Merge pull request #360 from pblottiere/ci_sqllinter
Use SQLFluff as SQL linter
2 parents c6274e0 + f2d5513 commit 24e0cb1

3 files changed

Lines changed: 18 additions & 13 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 --dialect postgres ./pgsql/pointcloud.sql.in
36+
sqlfluff lint --dialect postgres ./pgsql_postgis/pointcloud_postgis.sql.in

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ https://pgpointcloud.ubuntu.io/pointcloud/ for more information.
1212

1313
| | w/o PostGIS | PostGIS 3.3 |
1414
| ------------------ |:-----------:|:-----------:|
15-
| PostgreSQL 13 | ![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres13_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres13_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | ![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres13_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres13_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) |
16-
| PostgreSQL 14 | ![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres14_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres14_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | ![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres14_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres14_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) |
17-
| PostgreSQL 15 | ![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres15_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres15_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | ![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres15_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres15_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) |
18-
| PostgreSQL 16 | ![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres16_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres16_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | ![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres16_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres16_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) |
15+
| PostgreSQL 13 | ![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres13_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres13_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | ![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres13_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres13_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) |
16+
| PostgreSQL 14 | ![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres14_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres14_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | ![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres14_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres14_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) |
17+
| PostgreSQL 15 | ![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres15_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres15_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | ![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres15_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres15_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) |
18+
| PostgreSQL 16 | ![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres16_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres16_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | ![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres16_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)<br />![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres16_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) |

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)