Jump to clang-format-15 since it is available on 22.04 github runners

This commit is contained in:
Dennis Luxen 2024-05-06 07:55:22 +02:00
parent f7427b383f
commit 3dc407095e
4 changed files with 8 additions and 8 deletions

View File

@ -88,7 +88,7 @@ jobs:
- name: Prepare environment - name: Prepare environment
run: | run: |
npm ci --ignore-scripts npm ci --ignore-scripts
clang-format-14 --version clang-format-15 --version
- name: Run checks - name: Run checks
run: | run: |
./scripts/check_taginfo.py taginfo.json profiles/car.lua ./scripts/check_taginfo.py taginfo.json profiles/car.lua

View File

@ -13,7 +13,7 @@
- REMOVED: Drop support of Node 12 & 14. [#6431](https://github.com/Project-OSRM/osrm-backend/pull/6431) - REMOVED: Drop support of Node 12 & 14. [#6431](https://github.com/Project-OSRM/osrm-backend/pull/6431)
- ADDED: Add 'load directly' mode to default Cucumber test suite. [#6663](https://github.com/Project-OSRM/osrm-backend/pull/6663) - ADDED: Add 'load directly' mode to default Cucumber test suite. [#6663](https://github.com/Project-OSRM/osrm-backend/pull/6663)
- CHANGED: Drop support for Node 16 [#6855](https://github.com/Project-OSRM/osrm-backend/pull/6855) - CHANGED: Drop support for Node 16 [#6855](https://github.com/Project-OSRM/osrm-backend/pull/6855)
- CHANGED: Upgrade clang-format to version 14 [#6859](https://github.com/Project-OSRM/osrm-backend/pull/6859) - CHANGED: Upgrade clang-format to version 15 [#6859](https://github.com/Project-OSRM/osrm-backend/pull/6859)
- NodeJS: - NodeJS:
- CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452) - CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452)
- Misc: - Misc:

View File

@ -10,7 +10,7 @@ You can add a :+1: emoji reaction to the issue if you want to express interest i
# Developer # Developer
We use `clang-format` version `14` to consistently format the code base. There is a helper script under `scripts/format.sh`. We use `clang-format` version `15` to consistently format the code base. There is a helper script under `scripts/format.sh`.
The format is automatically checked by the `mason-linux-release` job of a Travis CI build. The format is automatically checked by the `mason-linux-release` job of a Travis CI build.
To save development time a local hook `.git/hooks/pre-push` To save development time a local hook `.git/hooks/pre-push`
``` ```

View File

@ -19,18 +19,18 @@ elif [[ ${OS} = "Darwin" ]] ; then
fi fi
# Discover clang-format # Discover clang-format
if type clang-format-14 2> /dev/null ; then if type clang-format-15 2> /dev/null ; then
CLANG_FORMAT=clang-format-14 CLANG_FORMAT=clang-format-15
elif type clang-format 2> /dev/null ; then elif type clang-format 2> /dev/null ; then
# Clang format found, but need to check version # Clang format found, but need to check version
CLANG_FORMAT=clang-format CLANG_FORMAT=clang-format
V=$(clang-format --version) V=$(clang-format --version)
if [[ $V != *14.0* ]] ; then if [[ $V != *15.0* ]] ; then
echo "clang-format is not 14.0 (returned ${V})" echo "clang-format is not 15.0 (returned ${V})"
#exit 1 #exit 1
fi fi
else else
echo "No appropriate clang-format found (expected clang-format-14, or clang-format)" echo "No appropriate clang-format found (expected clang-format-15, or clang-format)"
exit 1 exit 1
fi fi