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

Formatter does not work properly with indentation of if-else. #353

Open
BjoernLuig opened this issue Nov 4, 2024 · 2 comments
Open

Formatter does not work properly with indentation of if-else. #353

BjoernLuig opened this issue Nov 4, 2024 · 2 comments

Comments

@BjoernLuig
Copy link
Contributor

Current behaviour

Formatter does not work properly. For example:

void loop() {
  solar_update_SB041();
  if (( solar_panel_voltage > 2)) {
    deep_sleep_and_restart(30 * 60000);}
    else {
      deep_sleep_and_restart(12 * 3600000);}

    }

Expected behaviour

Proper indentation of if-else and no space infront of solar_panel_voltage. For example:

void loop() {
  solar_update_SB041();
  if ((solar_panel_voltage > 2)) {
    deep_sleep_and_restart(30 * 60000);
  } else {
    deep_sleep_and_restart(12 * 3600000);
  }
}
@mariopesch
Copy link
Member

mariopesch commented Nov 4, 2024

Is the code generated via blocks?

@BjoernLuig
Copy link
Contributor Author

Yes and using the format button in the code editor doesn't work either.

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

No branches or pull requests

2 participants