1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 20:47:34 +00:00

Meta: Switch to clang-format-15 as the standard formatter

The two major changes noticeable on the SerenityOS codebase are:
- Much improved support for const placement, clang-format-14 ignored
  our east-const configuration in various places
- Different formatting for requires clauses, now breaking them onto
  their own line, which helps with readability a bit

Current versions of CLion also ship LLVM 15, so the built-in formatting
now matches CI formatting again :^)
This commit is contained in:
Linus Groh 2022-10-17 00:05:51 +02:00
parent 0d63b7a515
commit 8639d8bc21
7 changed files with 22 additions and 20 deletions

View file

@ -57,9 +57,9 @@ jobs:
# Packages below aren't.
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main'
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main'
sudo apt-get update
sudo apt-get install -y clang-format-14 ccache e2fsprogs gcc-12 g++-12 libstdc++-12-dev libmpfr-dev libmpc-dev ninja-build optipng qemu-utils qemu-system-i386 unzip
sudo apt-get install -y clang-format-15 ccache e2fsprogs gcc-12 g++-12 libstdc++-12-dev libmpfr-dev libmpc-dev ninja-build optipng qemu-utils qemu-system-i386 unzip
- name: Install JS dependencies
run: sudo npm install -g prettier@2.7.1
- name: Install Python dependencies
@ -68,7 +68,7 @@ jobs:
python -m pip install --upgrade pip
pip install flake8 requests
- name: Check versions
run: set +e; g++ --version; g++-12 --version; clang-format --version; clang-format-14 --version; prettier --version; python --version; python3 --version; ninja --version; flake8 --version; ccache --version; qemu-system-i386 --version
run: set +e; g++ --version; g++-12 --version; clang-format --version; clang-format-15 --version; prettier --version; python --version; python3 --version; ninja --version; flake8 --version; ccache --version; qemu-system-i386 --version
# === PREPARE FOR BUILDING ===

View file

@ -26,9 +26,9 @@ jobs:
#
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main'
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main'
sudo apt-get update
sudo apt-get install -y clang-format-14 gcc-12 g++-12 libstdc++-12-dev libmpfr-dev libmpc-dev ninja-build unzip pvs-studio
sudo apt-get install -y clang-format-15 gcc-12 g++-12 libstdc++-12-dev libmpfr-dev libmpc-dev ninja-build unzip pvs-studio
- name: Check versions
run: set +e; g++ --version; g++-12 --version; ninja --version;

View file

@ -59,9 +59,9 @@ jobs:
# Packages below aren't.
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main'
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main'
sudo apt-get update
sudo apt-get install -y clang-format-14 gcc-12 g++-12 libstdc++-12-dev libmpfr-dev libmpc-dev ninja-build unzip
sudo apt-get install -y clang-format-15 gcc-12 g++-12 libstdc++-12-dev libmpfr-dev libmpc-dev ninja-build unzip
- name: Check versions
run: set +e; g++ --version; g++-12 --version; ninja --version;