Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Labeled case statements not formatted correctly #175

Open
sriram-LANL opened this issue Sep 11, 2024 · 3 comments
Open

Labeled case statements not formatted correctly #175

sriram-LANL opened this issue Sep 11, 2024 · 3 comments

Comments

@sriram-LANL
Copy link

sriram-LANL commented Sep 11, 2024

the following input:

  ! Fails: Labelled
  casetest:select case(i)
  case (1)
     write(*,*) 'nay'
  end select casetest

  ! Works: Not labelled
  select case(i)
  case (1)
     write(*,*) 'yay'
  end select

processed with python3 fprettify -i 4 test.F90 results in:

  ! Fails: Labelled
  casetest:select case(i)
  case (1)
  write (*, *) 'nay'
  end select casetest

  ! Works: Not labelled
  select case (i)
  case (1)
      write (*, *) 'yay'
  end select

Note that the first case statement is not correctly indented.

Incidentally labelled do statements work just fine!

PS: this is a great tool - thanks for making it available

@dbroemmel
Copy link
Contributor

I think this is similar to #152 or #170. My suggested fix did however miss to fully fix the SELECT RANK|TYPE. Whichever is included would be an improvement, I guess?

@sriram-LANL
Copy link
Author

@dbroemmel is the project still being actively developed?
We would very much like to have this (or MR152) in the main branch so that we don’t have to use a fork for full formatting.

@dbroemmel
Copy link
Contributor

I'm not entirely sure, all I can go by is #127. I am currently using it off my fork as well.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants