-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style #411
Comments
I am personally of the opinion that the path of least resistance (both in terms of getting consensus and also logistically) is to use an automated formatter, like clang-format. This won't fix things like the occasionally CamelCase slip-up, but it
As for the choice of which styler in particular to use (and indeed whether to listen to me at all -- I barely contribute, maybe you all enjoy arguing about bracket placement and |
I have experimented with clang-format before for decomp (and indeed use it in mgfembp) and it works good for actual code but it (understandably) sucks for weird data initializers whose structure isn't reflected syntactically like procs or sprites. My "solution" was to manually enclose them in |
But whatever, I don't particularly mind what kind of code style we adopt. If there is consensus, I may also follow to it. |
I think I would be happy with the formatting options that are already set up for |
Hello guys, I wonder is there a clang format templete for this style? I'm considering write a clang format (not for decomp), for now I have made on:
|
Right now, style is inconsistent (I am to blame too). Here are some examples of diverging style elements found in fe8u:
type *var
type* var
type* var
type *var
type *var
type* var
We should probably agree on a consistent style (at least for braces and pointer declarations I think) and enforce it for contributions. The discussion of which style is, in my opinion, up to regular contributors (right now I think @MokhaLeee and @Eebit qualify).
My own (current) opinions regarding brace and pointer decl style are (sorry Mokha): I don't like K&R braces (inconsistent) and I don't like
type *var
style declarations (I prefertype * var
and mindtype* var
less). Feel free to disregard them (I only rarely contribute directly these days).Naming conventions are also something that probably should be made explicit.
The text was updated successfully, but these errors were encountered: