mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-07 21:17:07 +09:00
Meta: Switch to clang-format-20 as the standard formatter
This commit is contained in:
parent
313e490fb6
commit
d30f6f1b11
Notes:
github-actions[bot]
2025-05-14 08:06:59 +00:00
Author: https://github.com/trflynn89
Commit: d30f6f1b11
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4715
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/BertalanD
Reviewed-by: https://github.com/InvalidUsernameException
4 changed files with 9 additions and 4 deletions
2
.github/workflows/lint-code.yml
vendored
2
.github/workflows/lint-code.yml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
|||
run: |
|
||||
set -e
|
||||
|
||||
brew install curl flake8 llvm@19 ninja optipng shellcheck swift-format unzip
|
||||
brew install curl flake8 llvm@20 ninja optipng shellcheck swift-format unzip
|
||||
|
||||
# Note: gn isn't available in homebrew :(
|
||||
# Corresponds to https://gn.googlesource.com/gn/+/225e90c5025bf74f41dbee60d9cde4512c846fe7
|
||||
|
|
|
@ -67,7 +67,7 @@ Nobody is perfect, and sometimes we mess things up. That said, here are some goo
|
|||
**Do:**
|
||||
|
||||
* Write in idiomatic project-style C++23, using the `AK` containers in all code.
|
||||
* Conform to the project coding style found in [CodingStyle.md](https://github.com/LadybirdBrowser/ladybird/blob/master/Documentation/CodingStyle.md). Use `clang-format` (version 19) to automatically format C++ files. See [AdvancedBuildInstructions.md](https://github.com/LadybirdBrowser/ladybird/blob/master/Documentation/AdvancedBuildInstructions.md#clang-format-updates) for instructions on how to get an up-to-date version if your OS distribution does not ship clang-format-19.
|
||||
* Conform to the project coding style found in [CodingStyle.md](https://github.com/LadybirdBrowser/ladybird/blob/master/Documentation/CodingStyle.md). Use `clang-format` to automatically format C++ files.
|
||||
* Choose expressive variable, function and class names. Make it as obvious as possible what the code is doing.
|
||||
* Split your changes into separate, atomic commits (i.e. A commit per feature or fix, where the build, tests and the system are all functioning).
|
||||
* Make sure your commits are rebased on the master branch.
|
||||
|
|
|
@ -2,7 +2,12 @@
|
|||
|
||||
For low-level styling (spaces, parentheses, brace placement, etc), all code should follow the format specified in `.clang-format` in the project root.
|
||||
|
||||
**Important: Make sure you use `clang-format` version 19!**
|
||||
**Important: Make sure you use the correct version of `clang-format`!**
|
||||
|
||||
See [lint-clang-format.sh](../Meta/lint-clang-format.sh) for the version enforced in CI.
|
||||
|
||||
See [AdvancedBuildInstructions.md](AdvancedBuildInstructions.md#clang-format-updates) for instructions on how to get an
|
||||
up-to-date version if your OS distribution does not ship the correct version.
|
||||
|
||||
This document describes the coding style used for C++ code in the Ladybird Browser project. All new code should conform to this style.
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -e
|
||||
|
||||
CLANG_FORMAT_VERSION=19
|
||||
CLANG_FORMAT_VERSION=20
|
||||
|
||||
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
||||
cd "${script_path}/.." || exit 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue