_____

Wfindent: converts files in place

Findent reads from standard input and writes to standard output, so if you want to convert one or more files, some kind of script is needed: wfindent.

Example: recursively indent and relabel all .f90 files in the current directory:

find . -name '*.f90' -print0 | xargs -0 wfindent -i4 --relabel

The man page:

WFINDENT(1)                                  User Commands                                 WFINDENT(1)

NAME
       wfindent - Indents, converts and relabels Fortran program sources

SYNOPSIS
       wfindent [OPTION]... [-] [FILE]...

DESCRIPTION
       Wfindent  is  a  wrapper  for  findent(1), calling findent for each of the files. The files are
       overwritten by the modified version. A sanity check is made before overwriting an  input  file.
       Files that are not regular and readable and writable are silently skipped.

NOTE
       The  end of the options is reached when a flag containing a '.'  (e.g. 'prog.f90') is found, or
       when the flag '-' is found.

       See 'man 1 findent' or 'findent -h' for the options. Only options that create a (probably modi‐
       fied) version of the input are effective.

ENVIRONMENT
       The environment variable FINDENT influences the working of wfindent.  If set, wfindent will use
       this as the location of findent.

EXAMPLE:
       wfindent -i4 *.f90

COPYRIGHT
       This is free software; see the source for copying conditions.  There is NO warranty;  not  even
       for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

wfindent                                         2021                                      WFINDENT(1)