Possibility to introduce .clang-format
for AzerothCore project
#20750
Replies: 1 comment
-
@gontrannopier To answer your question
The previous PR where
There exists a Current standardsAcore uses a wiki article that contains cpp code standards together with CI python script to enforce some rules. I've found that it is not enough as sometimes a manual review still fails due to style. This should be avoided. An option is to extend the wiki or add more rules to the codestyle-check CI, but clang-format should be the tool for this job. Clang-format does come with a large caviat if I read correctly: You're not able to pick and choose which rules are enforced. It's all or nothing. AzerothCore is quite lenient when it comes to codestyle. There are only a few rules compared to what clang-format enforces. I've found that applying a style brings massive changes, well over 100K+ lines changed. Writing a configclang-format docs: https://clang.llvm.org/docs/ClangFormatStyleOptions.html I've researched, wrote and applied a config for clang-format v18.1.3 I used the above tool with a modified sample to create a config that matches acore's style. It's not perfect and has these issues:
below is a diff of acore with ConclusionTo me it's feasible to include a I'm curious other people think about this. |
Beta Was this translation helpful? Give feedback.
-
Hey guys, I recently started to code for AC and I noticed there's a missing
.clang-format
file for formatting the project code. I also found out it was removed almost 3 years ago in this pull request. But I can't understand why it was removed, maybe I'm missing some information that I'm not aware of.I think it would be very helpful to have
.clang-format
, so there's unified formatting for the project. It's at least easier for the IDE (I'm using CLion) to have the same formatting as the project wants.What do you think?
Beta Was this translation helpful? Give feedback.
All reactions