mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Documentation: Suggest installing clang-format version 18 precisely
This commit is contained in:
parent
8f45f59df3
commit
5c35807878
Notes:
github-actions[bot]
2024-10-14 21:55:52 +00:00
Author: https://github.com/jdmnd Commit: https://github.com/LadybirdBrowser/ladybird/commit/5c35807878e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1753 Reviewed-by: https://github.com/ADKaster ✅
5 changed files with 5 additions and 5 deletions
|
@ -63,7 +63,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 18 or later) 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-18.
|
||||
* Conform to the project coding style found in [CodingStyle.md](https://github.com/LadybirdBrowser/ladybird/blob/master/Documentation/CodingStyle.md). Use `clang-format` (version 18) 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-18.
|
||||
* 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.
|
||||
|
|
|
@ -126,7 +126,7 @@ brew install autoconf autoconf-archive automake ccache cmake ffmpeg nasm ninja p
|
|||
|
||||
If you wish to use clang from homebrew instead:
|
||||
```
|
||||
brew install llvm
|
||||
brew install llvm@18
|
||||
```
|
||||
|
||||
If you also plan to use the Qt chrome on macOS:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
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 18 or later!**
|
||||
**Important: Make sure you use `clang-format` version 18!**
|
||||
|
||||
This document describes the coding style used for C++ code in the Ladybird Browser project. All new code should conform to this style.
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ Qt Creator should be set up correctly now, go ahead and explore the project and
|
|||
|
||||
## Auto-Formatting
|
||||
|
||||
You can use `clang-format` to help you with the [style guide](CodingStyle.md). Before you proceed, check that you're actually using clang-format version 18, as some OSes will ship older clang-format versions by default.
|
||||
You can use `clang-format` to help you with the [style guide](CodingStyle.md). Before you proceed, check that you're actually using clang-format version 18, as some OSes will ship other clang-format versions by default.
|
||||
|
||||
- In QtCreator, go to "Help > About Plugins…"
|
||||
- Find the `Beautifier (experimental)` row (for example, by typing `beau` into the search)
|
||||
|
|
|
@ -22,7 +22,7 @@ sudo add-apt-repository ppa:canonical-server/server-backports
|
|||
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-16 main'
|
||||
apt update
|
||||
apt install git build-essential make cmake clang-format-16 gcc-13 g++-13 libstdc++-13-dev libgmp-dev ccache libmpfr-dev libmpc-dev ninja-build e2fsprogs qemu-utils qemu-system-i386 wabt
|
||||
apt install git build-essential make cmake clang-format-18 gcc-13 g++-13 libstdc++-13-dev libgmp-dev ccache libmpfr-dev libmpc-dev ninja-build e2fsprogs qemu-utils qemu-system-i386 wabt
|
||||
```
|
||||
### Force usage of GCC 13
|
||||
```shell
|
||||
|
|
Loading…
Reference in a new issue