Skip to content

Whitespace #27

@nerai

Description

@nerai

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.

  1. Should tabs be used for indentation (but not formatting)?
    I definitely think so, but I am not too religious about it.

  2. 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.

  3. Space before opening parenthesis?
    foo (2) instead of foo(2)
    It is not currently applied. I find it easier to read.

  4. 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.

  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions