fortran-lang / fprettify

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

config file example #142

Open alsimoneau opened 1 year ago

alsimoneau commented 1 year ago

Could an example config file be provided? I can't seem to be able to format it properly to support the CASE argument.

Thank you for your work!

vickysharma0812 commented 1 year ago

I use following config file: Please let me know if you need more information.

case = [2,2,2,2]
line-length = 78
indent = 2
disable-indent = false
strict-indent = true
whitespace = 2
whitespace-comma = true
whitespace-assignment = true
enable-decl = true
whitespace-decl = true
whitespace-relational = true
whitespace-logical = true
whitespace-multdiv = true
whitespace-print = true
whitespace-type = false
whitespace-intrinsics = true
gnikit commented 1 year ago

fprettify uses ConfigArgParse for its command line interface. Have a look at their examples for an intro to the config files

brunotessaro commented 1 year ago

Can you tell me where should I put such config file so that fprettify use the specified configurations upon call?

nbehrnd commented 1 year ago

@Bruno

One of the discussion on fortran-lang provided an example of application of a fprettify config file - possibly equally suitable for you as reference:

https://fortran-lang.discourse.group/t/fprettify-patrick-seewald-seeks-collaborator/4199/10