fortran-lang / fprettify

auto-formatter for modern fortran source code
https://pypi.python.org/pypi/fprettify
Other
370 stars 76 forks source link

Add a new option "--disable-indent-subroutine" #105

Open zaikunzhang opened 3 years ago

zaikunzhang commented 3 years ago

Thank you very much for developing this great package!

In the current version, there are three options concerning disable indentation:

--disable-indent don't impose indentation (default: False) --disable-fypp Disables the indentation of fypp preprocessor blocks (default: False) --disable-indent-mod Disables the indentation after module / program (default: False)

The latter two options provide flexibility to the users who want to disable indentation partially, which is very nice. However, the user's preference may not be covered by these two options. For example, one may like to disable indentation for module/program/subroutine/function and keep all the others. I guess there is no easy way to do it with the current version.

That said, what about adding a new option "--disable-indent-subroutine". Or, better, maybe provide an option that accepts a list of indentations to disable?

Again, many thanks for this very useful software. Thank you very much for your consideration.

zaikunzhang commented 3 years ago

BTW, "--disable-indent-subroutine" would disable the indentation for subroutine and function. Thank you.