-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Autoformat workflow #2067
Autoformat workflow #2067
Conversation
If there aren't objections i will merge this |
Go ahead and integrate it. If it causes problems, we can simply delete the workflow, right? |
Shall we test this in a separate branch with a dummy PR first? Just to see if it works fine before applying it on real PRs. |
Yes
I've tested it here https://github.com/RiccardoblSandbox/jmonkeyengine-test . |
Do we prefer this
over this?
or was that because of the line length setting you mentioned above? |
I think the maximum line length should be 110 characters/columns, per our preferred coding style: https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/CONTRIBUTING.md#coding-style |
This is the formatting with line width = 110
Done, it seems JME_style.xml has some errors |
I think it looks better now, thanks. What was the default width used by the plugin? |
it uses 80 |
Is there any reason to retain the "autoformat" branch in the public repo? |
nope, removed. |
A github action workflow that applies prettifier to pull requests (if needed) to automatically fix formatting issues.
Why prettifier?
The goal is to make pr integration faster by resolving all sort of formatting issues automatically, since sometimes, even with a properly configured editor it is possible to miss some. (Unless you configure your editor to format on save, but can pollute the commit since most of our code was not formatted properly from the start.).
With this workflow contributors can simply pr changes and have github action attach a formatting commit for the changed files, only if necessary.
I won't hide the fact that i am proposing this also because i am starting to believe i have developed some form of formatting blindness, since despite putting in 101% effort my PRs always have formatting issues 🦀 .