From 930cce3e1aeaba437650be1727a798bcec92968b Mon Sep 17 00:00:00 2001 From: Blottiere Paul Date: Sat, 3 May 2025 22:30:52 +0200 Subject: [PATCH 1/3] Fix typo in badge url --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3f23e7b9..4b8d8e3c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ https://pgpointcloud.ubuntu.io/pointcloud/ for more information. | | w/o PostGIS | PostGIS 3.3 | | ------------------ |:-----------:|:-----------:| -| PostgreSQL 13 | ![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres13_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)
![](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)
![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres13_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | -| PostgreSQL 14 | ![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres14_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)
![](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)
![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres14_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | -| PostgreSQL 15 | ![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres15_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)
![](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)
![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres15_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | -| PostgreSQL 16 | ![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres16_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)
![](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)
![](https://img.shields.io/ubuntu/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres16_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | +| PostgreSQL 13 | ![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres13_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)
![](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)
![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres13_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | +| PostgreSQL 14 | ![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres14_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)
![](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)
![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres14_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | +| PostgreSQL 15 | ![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres15_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)
![](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)
![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres15_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | +| PostgreSQL 16 | ![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/jammy_postgres16_postgis33.yml?branch=master&label=Ubuntu%2022.04&logo=ubuntu)
![](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)
![](https://img.shields.io/github/actions/workflow/status/pgpointcloud/pointcloud/noble_postgres16_postgis33.yml?branch=master&label=Ubuntu%2024.04&logo=ubuntu) | From 2c95a1f0245ddc9c0baceff7eee5e504593292c7 Mon Sep 17 00:00:00 2001 From: Blottiere Paul Date: Sat, 3 May 2025 22:33:45 +0200 Subject: [PATCH 2/3] Use sqlfluff as SQL linter --- .github/workflows/code_layout.yml | 19 ++++++++++++------- doc/development.rst | 4 ++-- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/code_layout.yml b/.github/workflows/code_layout.yml index d4c04fb4..fc6c2aca 100644 --- a/.github/workflows/code_layout.yml +++ b/.github/workflows/code_layout.yml @@ -19,13 +19,18 @@ jobs: 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 sql_code_layout: name: SQL linter - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - name: Install nvm - uses: actions/setup-node@v1 + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 with: - node-version: '8' - - name: Linter + python-version: '3.10' + - name: Install SQLFluff + run: | + pip install sqlfluff + - name: Run SQLFluff lint run: | - npm install -g eclint@1.1.5 - eclint check * */* */cunit/* + sqlfluff lint ./pgsql/pointcloud.sql.in + sqlfluff lint ./pgsql_postgis/pointcloud_postgis.sql.in diff --git a/doc/development.rst b/doc/development.rst index 21245abb..faa90f27 100644 --- a/doc/development.rst +++ b/doc/development.rst @@ -164,9 +164,9 @@ and with various PostgreSQL/PostGIS releases: .. |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 -.. |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 +.. |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 -.. |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 +.. |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 .. |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 From f2d55135d46cc21708f2759b1640850d44ebd948 Mon Sep 17 00:00:00 2001 From: Blottiere Paul Date: Sat, 3 May 2025 22:38:05 +0200 Subject: [PATCH 3/3] Add explicit postgresql dialect for linter --- .github/workflows/code_layout.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code_layout.yml b/.github/workflows/code_layout.yml index fc6c2aca..5516ada8 100644 --- a/.github/workflows/code_layout.yml +++ b/.github/workflows/code_layout.yml @@ -32,5 +32,5 @@ jobs: pip install sqlfluff - name: Run SQLFluff lint run: | - sqlfluff lint ./pgsql/pointcloud.sql.in - sqlfluff lint ./pgsql_postgis/pointcloud_postgis.sql.in + sqlfluff lint --dialect postgres ./pgsql/pointcloud.sql.in + sqlfluff lint --dialect postgres ./pgsql_postgis/pointcloud_postgis.sql.in