fprettify
fprettify copied to clipboard
[Feature request] Impose whitespace formatting only on selected "classes"
trafficstars
Right now whitespace formatting can be turned on/off for everything and some options allow to add/remove whitespaces around "operators".
There is no option to leave whitespace "as-is" for selected "operators".
For example:
$cat test.F90
f(asd, asd ,asf+1,asf+ 1)
Would give:
$fprettify.py -s test.F90
f(asd, asd, asf + 1, asf + 1)
$fprettify.py -s --whitespace-plusminus False test.F90
f(asd, asd, asf+1, asf+1)
$fprettify.py -s --disable-whitespace test.F90
f(asd, asd ,asf+1,asf+ 1)
It would be nice to selectively choose what "operators" ['plusminus', 'intrinsics', 'logical', 'assignments', 'multdiv', 'relational', 'print', 'comma', 'type'] have their whitespaces modified and by how much (maybe allow different spacing before and after, useful for commas for example).
See Pull Request https://github.com/pseewald/fprettify/pull/51 for a branch implementing this