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

Indentation broken for named select case statements #170

Closed
wpbonelli opened this issue Mar 9, 2024 · 3 comments
Closed

Indentation broken for named select case statements #170

wpbonelli opened this issue Mar 9, 2024 · 3 comments

Comments

@wpbonelli
Copy link

wpbonelli commented Mar 9, 2024

Normal select case statements are formatted properly, e.g.

program test
    character :: c
  c = 'a'
select case (c)
  case ('b')
        print *, c
    case default
    print *, 'default'
  end select
end program test

becomes

program test
   character :: c
   c = 'a'
   select case (c)
   case ('b')
      print *, c
   case default
      print *, 'default'
   end select
end program test

Adding a name breaks the nested indentation so this

program test
    character :: c
  c = 'a'
l: select case (c)
  case ('b')
        print *, c
    case default
    print *, 'default'
  end select l
end program test

becomes

program test
   character :: c
   c = 'a'
   l:select case(c)
   case ('b')
   print *, c
   case default
   print *, 'default'
   end select l
end program test

This does not seem to apply to other named constructs, e.g. named do loops are reformatted properly.

@dbroemmel
Copy link
Contributor

I think this is #152?

@wpbonelli
Copy link
Author

sorry @dbroemmel, I missed that issue. Closing this duplicate

@wpbonelli wpbonelli closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
@dbroemmel
Copy link
Contributor

No problem at all, simply wanted to avoid duplicate work. Also nice to see that others face similar difficulties as I do.

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