Skip to content

Conversation

@wilzbach
Copy link
Contributor

basically just running:

sed -i "s/switch(/switch (/" **/*.d
sed -i "s/foreach(/foreach (/" **/*.d
sed -i "s/foreach_reverse(/foreach_reverse (/" **/*.d
sed -i "s/while(/while (/" **/*.d
sed -i "s/if(/if (/" **/*.d

over the codebase.

@wilzbach
Copy link
Contributor Author

I split this into multiple PR. However there are still a couple of modules outstanding, so let me know if you want to enforce this style.

Btw at mir we run the following in our CI to enforce the spaces, might be worth adding:

grep -E "(for|foreach|foreach_reverse|if|while|switch)\(" $(find source -name '*.d'); test $? -eq 1

For such style nitpicks, it might be useful to have a separate CI (like Travis or Circle CI) that runs immediately and gives the submitter an instant feedback. It's just a one-liner, so you can set this up in five mins ;-)

@wilzbach
Copy link
Contributor Author

For such style nitpicks, it might be useful to have a separate CI (like Travis or Circle CI) that runs immediately and gives the submitter an instant feedback

Final word: that might save a lot time for you, as you don't have to do such nitpicks anymore. Btw there's also the Dscanner project with which you could lint more in Phobos. We successfully use DScanner for mir.

@wilzbach
Copy link
Contributor Author

Closed in favor of doing it one PR - #4240
Sorry for the spam.

@wilzbach wilzbach closed this Apr 26, 2016
@wilzbach wilzbach deleted the space_between_operators_algorithm branch April 26, 2016 19:27
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

Successfully merging this pull request may close these issues.

1 participant