fortran-lang / fprettify

auto-formatter for modern fortran source code

Home Page:https://pypi.python.org/pypi/fprettify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

define maximum number of empty lines

stigh opened this issue · comments

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 here: https://eslint.style/rules/js/no-multiple-empty-lines. According to eslint documentation:

Some developers prefer to have multiple blank lines removed, while others feel that it helps improve readability. Whitespace is useful for separating logical sections of code, but excess whitespace takes up more of the screen.

I see there is a PR in https://github.com/pseewald/fprettify/pull/106, which seem to have been closed unintentionally. --keep-blank-lines would solve my issue, but I think an even better solution would be to define a maximum value.