fprettify
fprettify copied to clipboard
auto-formatter for modern fortran source code
Resolves https://github.com/pseewald/fprettify/issues/164. This does not contain any tests, so is currently only intended as a proposal. This solves only one of the several limits with fprettify I need to solve...
Today fprettify will not allow more than 1 consecutive empty lines. Personally I like to keep 2 empty lines between subroutines and functions for improved readability. See inspiration from eslint...
An example can be this example file, for reference called `test.f90`: ```fortran PROGRAM TestModule implicit none call test() contains subroutine test() INTEGER i DO i = 1, 2 print *,...
Previously, fprettify did not understand CUDA fortran's triple-chevron syntax for calling kernel functions, e.g. ```fortran call example_kernel(args) ``` As a result, each symbol in the chevrons ` (args) ``` This...
When applying fprettify using the `--case 1 1 1 1` option, the following code takes a long time to format because of the matching of floating point constants: ``` program...
- Labeled case select statements were not being formatted correctly - See Issue #175 - Fixed `SyntaxWarning: invalid escape sequence '\s'` warning at line 272 of `__init__.py` by converting to...
Hi! I have a question about how fprettify handles indentation over multiple `#ifdef` blocks. Here is a code snippet formatted with. `$ fprettify --whitespace-comma --enable-decl -i 4 debug.f90` ```fortran program...
the following input: ```f90 ! 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...
``` logical:: g = .true. character(2) :: eq = "OK" if (g .and. eq.ne.'') print *, eq end ``` becomes ``` logical:: g = .true. character(2) :: eq = "OK"...
``` program test implicit none integer :: I, jj double precision :: A real(kind=8) :: B ! This is a comment for B real(kind=8) :: C A = 1.0d0 I...