Documentation: Add preferred coding style options to CLion configuration

This commit is contained in:
Linus Groh 2021-07-27 21:32:20 +01:00 committed by Andreas Kling
parent 55c0307288
commit 358356758a
Notes: sideshowbarker 2024-07-18 08:00:42 +09:00
2 changed files with 11 additions and 1 deletions

View file

@ -16,7 +16,7 @@ After opening the `serenity` repository in CLion as a new project, the "`Open Pr
> _If you have not built the Toolchain at this point, please do so: `./Toolchain/BuildIt.sh`_ > _If you have not built the Toolchain at this point, please do so: `./Toolchain/BuildIt.sh`_
If you already have the project open, you can go to "`File->Settings->Build, Execution, Deployment->Cmake`" to find these options. If you already have the project open, you can go to `File -> Settings -> Build, Execution, Deployment -> CMake` to find these options.
Remember to recreate the CMake cache after changing any of the options. Remember to recreate the CMake cache after changing any of the options.
@ -30,6 +30,16 @@ want exclude Toolchain files as well, follow the same procedure with the followi
- `Toolchain/Tarballs` - `Toolchain/Tarballs`
- `Toolchain/Build` - `Toolchain/Build`
## Code Generation Settings
To make code generated by CLion (e.g. identifier names, const placement) match the SerenityOS coding style, change the
following options under `Settings -> Editor -> Code Style -> C/C++`:
- On the `Code Generation` tab set `const/volatile qualifier placement` to `int const x = 0`
- On the `Naming Convention` tab, select the following:
![Screenshot of Naming Convention settings](./CLion_Naming_Convention.png)
## Notes for WSL Users ## Notes for WSL Users
It is possible to set the embedded terminal in CLion to the one that your WSL distribution provides. It is possible to set the embedded terminal in CLion to the one that your WSL distribution provides.

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB