Replies: 5 comments
-
I have a style I prefer, let me answer your questions:
However having said all that, this code base was written before I came to this realization, so I have consciously not reformatted it, however I'm considering it.
|
Beta Was this translation helpful? Give feedback.
-
Checkout the branch |
Beta Was this translation helpful? Give feedback.
-
I "upgraded" that branch to also include the latest C# features (7.2) - and renamed variables according to naming conventions. It's a huge cosmetic change, but one that I like. |
Beta Was this translation helpful? Give feedback.
-
Sorry, I have not yet had enough time to look closely. But your changes sound good. |
Beta Was this translation helpful? Give feedback.
-
Looking good. I agree with your reasoning of point 4. |
Beta Was this translation helpful? Give feedback.
-
My usual whitespace settings are completely different from what is mainly used in this codebase, so it is a bit cumbersome sometimes. I'm not sure how you feel about this @paviad, so I would like to ask for clarification what should be kept as is and what may be changed. I'm willing to adapt.
Should tabs be used for indentation (but not formatting)?
I definitely think so, but I am not too religious about it.
Line breaks unix style (LF) or windows style (CRLF)?
I love LF, which is currently used. Some commonly used tools sometimes break with them, but it seems it was mostly fixed in VS 2017, so I'd suggest keeping it like this.
Space before opening parenthesis?
foo (2)
instead offoo(2)
It is not currently applied. I find it easier to read.
Some braces on same line?
Currently all braces are on a new line. A more dense format (braces on new line only for classes and methods but not
if
,for
, lambdas etc.) seems easier to read to me. Especially as there are no long, complex lines in this project that would need space around them to be readable.UTF8 BOM
UTF8 does not require a byte order marker. I suggest removing it.
Regardless of the decisions, it would be useful to have the relevant settings available in the repo so they can be imported into VS (and CodeMaid) easily. I can submit these for VS17. I'm currently abroad so I don't have VS13 and 15 with me.
Beta Was this translation helpful? Give feedback.
All reactions