summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-07-27 21:32:20 +0100
committerAndreas Kling <kling@serenityos.org>2021-07-27 22:49:41 +0200
commit358356758a761b7e76b956c4650443b8940d034b (patch)
tree98229d782fd790f3b91335eacf9bdac85e20c32d /Documentation
parent55c0307288cb53bc86075646231f9cd2b03f1366 (diff)
downloadserenity-358356758a761b7e76b956c4650443b8940d034b.zip
Documentation: Add preferred coding style options to CLion configuration
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/CLionConfiguration.md12
-rw-r--r--Documentation/CLion_Naming_Convention.pngbin0 -> 42321 bytes
2 files changed, 11 insertions, 1 deletions
diff --git a/Documentation/CLionConfiguration.md b/Documentation/CLionConfiguration.md
index ddc3cd2816..2ea12fb0c9 100644
--- a/Documentation/CLionConfiguration.md
+++ b/Documentation/CLionConfiguration.md
@@ -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 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.
@@ -30,6 +30,16 @@ want exclude Toolchain files as well, follow the same procedure with the followi
- `Toolchain/Tarballs`
- `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
It is possible to set the embedded terminal in CLion to the one that your WSL distribution provides.
diff --git a/Documentation/CLion_Naming_Convention.png b/Documentation/CLion_Naming_Convention.png
new file mode 100644
index 0000000000..c7e437ed0e
--- /dev/null
+++ b/Documentation/CLion_Naming_Convention.png
Binary files differ