Skip to content

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

Closed
vmuriart opened this issue Mar 12, 2016 · 13 comments
Closed

Clean up whitespacing on files #184

vmuriart opened this issue Mar 12, 2016 · 13 comments

Comments

@vmuriart
Copy link
Contributor

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.

@den-run-ai
Copy link
Contributor

@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

@vmuriart
Copy link
Contributor Author

@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 😃.
I'm not particularly familiar if there is a "preferred" style-guide for C/C# as there is for Python.

@den-run-ai
Copy link
Contributor

@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

@tonyroberts
Copy link
Contributor

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.

@den-run-ai
Copy link
Contributor

@vmuriart
Copy link
Contributor Author

I think there is a way to add it as a "test" that github would check against to ensure its ok.
I was working on some project this weekend and realized that VS is the culprit for alot of the formatting inconsistencies.

@den-run-ai
Copy link
Contributor

@vmuriart have a look at editorconfig for consistent configuration across various editors and IDEs:

https://github.com/editorconfig

@vmuriart
Copy link
Contributor Author

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.

@den-run-ai
Copy link
Contributor

in VS for code formatting Ctrl+K+D (Entire document)

@vmuriart
Copy link
Contributor Author

VS will apply its own formatting though, it doesn't respect editorconfig
unless it has an additional plugin installed. Found that out the hardway

On Tue, Mar 22, 2016 at 9:36 PM, denfromufa notifications@github.com
wrote:

in VS for code formatting Ctrl+K+D (Entire document)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#184 (comment)

@filmor
Copy link
Member

filmor commented Apr 1, 2016

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?

@vmuriart
Copy link
Contributor Author

vmuriart commented Apr 1, 2016

i didn't think of it the other way around.

@den-run-ai
Copy link
Contributor

@vmuriart @filmor I'm heavy VS and PTVS user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants