-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Autoformat should remove spaces after (if, while, switch) statement conditional #10326
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
Comments
Arduino uses Artistic Style for auto formatting: |
I opened an Astyle feature request: https://sourceforge.net/p/astyle/tickets/123/ |
Do you know if Astyle is abandoned? I have looked at the repo but I don't see any activity in the past 2 years... |
Sadly, the answer. |
Hi @Avamander thanks for your interest in improving the code formatting capabilities of the IDE! There is some good news related to this feature request. #11543 will change the Arduino IDE from using the Artistic Style formatter to ClangFormat, which provides just the sort of behavior you requested here. ClangFormat is very popular and actively developed, and even suggested by the Artistic Style developer at the post @fabiuz7 kindly shared.this statement where they state that they are no longer able to play as active a role in developing Artistic Style. You can give the test build for the ClangFormat/Arduino IDE integration a try. The downloads are available here: |
Uh oh!
There was an error while loading. Please reload this page.
For example when the code looks like this:
it should be turned into:
Same applies to switches:
switch (character) {
it should be turned into:
switch (character) {
The text was updated successfully, but these errors were encountered: