-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Check for bad white space before running tests #9809
Conversation
This would break building when git is not present, which we should theoretically support via |
Maybe we should use |
That might make sense, but be careful with what you assume |
I was thinking of using Or, we write the checker in Julia. When we are about to run the tests, there's a functional Julia environment. |
Realistically this only matters when git is present. If you aren't sending
|
There's also no need to search through files that aren't checked in. |
Let's try this out. Any objections to merging? |
I guess the idea here is to detect whitespace problems before things get submitted to Travis? Given that we have Travis set to fail, that seems like a good idea. But just checking: among large, active open-source projects, how common is it to be dogmatic about whitespace? I'm just wondering about the balance between keeping the codebase clean and putting up yet one more barrier (learning git is bad enough) for new contributors. |
We'd have to restrict that search to languages that don't yet have good auto-formatting tools. I think a better long-term solution than failing for nitpicky stuff like this would be to write a Problem is no one has written such a tool for Julia yet, AFAIK. I think it was a suggested GSoC project last year, and presumably will be again this year unless someone implements it before then. |
@timholy (my personal) long-term goal was to start a process where we would eventually have automated style / syntax checks against any code submitted to base. Pretty much every large open source project has this. Whitespace was first, it is easy to check for and cleans up diffs, but hopefully more will come later. As @tkelman pointed out, a set of agreed upon standards makes it easier to write automated tools. Maybe the make target should be Tools like |
Thanks for explaining. Since I find it annoying when I run across code that uses tabs rather than spaces, I am persuaded that long term this will be a good thing. |
Check for bad white space before running tests
No description provided.