-
Notifications
You must be signed in to change notification settings - Fork 749
Clean up whitespacing on files #184
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
Comments
@vmuriart you may also need to include a style guide for curly braces, tabs, spaces and newlines, so that this is enforced after this cleanup |
@denfromufa if you have something in mind I'm all ears. I was going to let Sublime/Atom figure out what needed fixing/cleaning up 😃. |
@vmuriart this looks good to me: https://msdn.microsoft.com/en-gb/library/ff926074.aspx except that curly braces are perhaps according to indent style of variant of Stroustrup: https://en.wikipedia.org/wiki/Indent_style#Variant:_Stroustrup |
I agree it would be nice to have it all consistent. The problem of editors changing whitespace/indentation etc won't necessarily be solved simply by doing that however. Everyone seems to have different settings wrt code style, so even if it was all one style someone else could have completely different styles set up in their editor and trash it all in the same way that happens now (and indeed I suspect that's why the code is in the state it's in). In order to enforce consistent styles we would first need a style guide for contributors, preferably one that can be checked before the code is checked in and as part of the CI process. Without having something that can be systematically be enforced there's not much point changing anything, as the same conversation will come up again and again as more changes with slight style variants are committed. |
@vmuriart @tonyroberts there are 2 tools for enforcing style: |
I think there is a way to add it as a "test" that github would check against to ensure its ok. |
@vmuriart have a look at editorconfig for consistent configuration across various editors and IDEs: |
Yea, I forgot about that. The problem is that Visual Studio doesn't enforce it without the plugin. Sorry haven't gotten around to this, work got busy soon after I posted this. |
in VS for code formatting |
VS will apply its own formatting though, it doesn't respect editorconfig On Tue, Mar 22, 2016 at 9:36 PM, denfromufa notifications@github.com
|
Wouldn't that be viable nonetheless? Can't you create an editorconfig that matches what VS is doing out of the box? I'm surely not the only one using VS when working on this, am I? |
i didn't think of it the other way around. |
In particular I'm referring to blank lines that have multiple spaces on them and no content.
One of the issues I've noticed for people submitting Pull Requests, is that their linters/text editors automatically strip them when saving changes. This obscures the changes that were done, and happens to alot of contributors.
To make it easy for everyone else contributing, we can make a single commit whose only purpose is to strip out all the lingering white-space and fix alignment so that all subsequent contributors don't have do worry about it.
@tonyroberts if you ok with this, i don't mind going through the files and cleaning them up and submitting a PR for it.
The text was updated successfully, but these errors were encountered: