Skip to content
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

Automatic source-code formatting #88

Open
mfherbst opened this issue Dec 12, 2019 · 3 comments · May be fixed by #102
Open

Automatic source-code formatting #88

mfherbst opened this issue Dec 12, 2019 · 3 comments · May be fixed by #102

Comments

@mfherbst
Copy link
Member

mfherbst commented Dec 12, 2019

Now that JuliaFormatter is around and reasonably stable, we could easily set something up and integrate it with our workflows using a git pre-commit hook.

@antoine-levitt
Copy link
Member

Not sure about running it automatically (might be a lot of hassle, and I don't trust it to be always right), but something that we run every once in a while (and check it's sensible), sure.

@mfherbst
Copy link
Member Author

I use some nice plugins for python and C++ to format my source code on each write. If you get use to it it's just great. You type your code and don't care about the formatting, write and boom it looks nice. If you don't like it, you can always disable it for a region. Happens rarely, however in my experience. Also this really helps to visually detect programming errors (because the formatting looks off). Trust me, once you have this setup and got used to it, you do not want to miss it.

@antoine-levitt
Copy link
Member

Yeah I have emacs doing a bunch of auto stuff also. But then its rules are going to be different from those of that formatter, and it's going to be super annoying. Plus sometimes I do know better than the automatic rule and I want to overwrite that. So let's keep it manual and run it every few months or so.

@mfherbst mfherbst linked a pull request Jan 16, 2020 that will close this issue
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 a pull request may close this issue.

2 participants