fprettify
fprettify copied to clipboard
missing split of `elseif` to `else if`
trafficstars
It seems to me fprettify does not provide an automated edit of keyword elseif to yield else if.
Inspired by a discussion in the fortitude project (link) I observe fprettify (version 0.3.7, fetched from PyPI) apparently doesn't edit elseif while e.g., endif and enddo routinely yield end if and end do, respectively.
My test file:
! test.f90
program test
implicit none
integer :: i
do i = 1, 8
if (i == 3) then
print *, "first branch"
elseif (i == 4) then
print *, "second branch"
endif
enddo
end program test
Tests run:
fprettify test.f90, i.e. default parameters:endifandenddoare split,elseifremainselseiffprettify --whitespace-intrinsics False test.f90: as expected,endifandenddoare equally retained as suchfprettify --whitespace-intrinsics True test.f90:endifandenddoare edited, butelseifis notfprettify --whitespace-logical True test.f90:endifandenddoare edited, butelseifis not
Is there a different flag or level more suitable for the task I should use instead?