mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
build: bump clang-format to version 18
This commit is contained in:
parent
ace1aff488
commit
c1ce8be31b
4 changed files with 10 additions and 9 deletions
8
.github/workflows/lint.yml
vendored
8
.github/workflows/lint.yml
vendored
|
@ -33,12 +33,12 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
|
||||||
echo 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' | sudo tee -a /etc/apt/sources.list
|
echo 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main' | sudo tee -a /etc/apt/sources.list
|
||||||
echo 'deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' | sudo tee -a /etc/apt/sources.list
|
echo 'deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main' | sudo tee -a /etc/apt/sources.list
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt-get install -y clang-format-17 iwyu
|
sudo apt-get install -y clang-format-18 iwyu
|
||||||
sudo snap install --edge --classic just
|
sudo snap install --edge --classic just
|
||||||
sudo ln -s /usr/bin/clang-format-17 /usr/local/bin/clang-format
|
sudo ln -s /usr/bin/clang-format-18 /usr/local/bin/clang-format
|
||||||
sudo apt-get install -y python3-pip
|
sudo apt-get install -y python3-pip
|
||||||
sudo python3 -m pip install pyjson5 pre-commit
|
sudo python3 -m pip install pyjson5 pre-commit
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ pre-commit install
|
||||||
To install required external dependencies on Ubuntu:
|
To install required external dependencies on Ubuntu:
|
||||||
|
|
||||||
```
|
```
|
||||||
apt-get install -y iwyu clang-format-17
|
apt-get install -y iwyu clang-format-18
|
||||||
```
|
```
|
||||||
|
|
||||||
After this, each time you make a commit a hook should trigger to automatically
|
After this, each time you make a commit a hook should trigger to automatically
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define ENDS_WITH_ZERO(num) (fabsf((num)-roundf((num))) < 0.0001f)
|
#define ENDS_WITH_ZERO(num) (fabsf((num) - roundf((num))) < 0.0001f)
|
||||||
|
|
||||||
typedef struct ITEM_NAME {
|
typedef struct ITEM_NAME {
|
||||||
const GAME_OBJECT_ID obj_id;
|
const GAME_OBJECT_ID obj_id;
|
||||||
|
|
|
@ -36,9 +36,10 @@ def main() -> None:
|
||||||
assert string_map
|
assert string_map
|
||||||
|
|
||||||
for gameflow_path in SHIP_DIR.rglob("*gameflow*.json*"):
|
for gameflow_path in SHIP_DIR.rglob("*gameflow*.json*"):
|
||||||
gameflow = gameflow_path.read_text()
|
old_gameflow = gameflow_path.read_text()
|
||||||
gameflow = postprocess_gameflow(gameflow, string_map)
|
new_gameflow = postprocess_gameflow(old_gameflow, string_map)
|
||||||
gameflow_path.write_text(gameflow)
|
if new_gameflow != old_gameflow:
|
||||||
|
gameflow_path.write_text(new_gameflow)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue