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

meson fmt does not handle else in nested `if correctly #13316

Closed
pbor opened this issue Jun 11, 2024 · 0 comments · Fixed by #13318
Closed

meson fmt does not handle else in nested `if correctly #13316

pbor opened this issue Jun 11, 2024 · 0 comments · Fixed by #13318
Assignees

Comments

@pbor
Copy link
Contributor

pbor commented Jun 11, 2024

Describe the bug

Create a dummy project with this meson file

project('test', 'c', meson_version: '>= 1.0.0')

conf = configuration_data()

foo = false
bar = false

if foo
  if bar
    conf.set('TEST', 1)
  else
    conf.set('TEST', 0)
  endif
endif

run meson fmt on it and it will be formatted to

project('test', 'c', meson_version: '>= 1.0.0')

conf = configuration_data()

foo = false
bar = false

if foo
  if bar
    conf.set('TEST', 1)
else
    conf.set('TEST', 0)
  endif
endif

Expected behavior
No changes to the file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants