CLion aestethic linter
已回答
I already know about Clang-Tidy. Which is great for finding flaws in your code right away. But I am also looking for some kind of linter that automatically correcty aestethic "mistakes". For example that there are no newlines between method-declarations, put the curly brace in the same line as the if/while/for statement and so on. Kind of like what eslint does for java-/typescript. I haven't found any rules for Clang-Tidy that would support this. If I missed them please let me know, if you know another good linter that can do all of this, please let me know too:
请先登录再写评论。
Hello!
You can configure the desired code style options (https://www.jetbrains.com/help/clion/configuring-code-style.html) and then reformat code (https://www.jetbrains.com/help/clion/reformat-and-rearrange-code.html) to apply them.
Also it's possible to use ClangFormat as alternative formatter - https://www.jetbrains.com/help/clion/clangformat-as-alternative-formatter.html