fprettify icon indicating copy to clipboard operation
fprettify copied to clipboard

auto-formatter for modern fortran source code

Results 81 fprettify issues
Sort by recently updated
recently updated
newest added
trafficstars

I'm using this example from Milan Curcic's book https://github.com/modern-fortran/stock-prices/blob/master/src/mod_io.f90 ```fortran integer function num_records(filename) ! Return the number of records (lines) of a text file. character(len=*), intent(in) :: filename integer ::...

enhancement

The current testing mechanism is hard to maintain and should be simplified: - [x] separate unit tests from tests acting on external Fortran code - [ ] Create at least...

testing

`fprettify -r $X` works if X is a directory but not if X is a file.

First, my apologies as I'm a novice Fortran programmer. I recently came across some code that did not prettify the way I would have expected it to. I am attaching...

When `split_reformatted_line` splits lines, the incorrect indices are used when `--enable-replacement` has been applied, changing the number of characters in the line. The replacements are imposed by `replace_relational_single_fline(f_line,...` after `get_linebreak_pos(lines,...`...

* organize the codebase into modules * use absolute instead of relative imports * no need for classes to inherit from `object` * use consistent camel case for class names...

* update python support classifiers in `setup.cfg` * ci test with python 3.8-3.12 * drop python 3.6-3.7 since they are [EOL](https://devguide.python.org/versions/) * add python version badges to readme

Formatting is not entirely deactivated between `!&` — auto-indentation is still applied. Is this the intended behavior? Naively I'd expect fprettify to do nothing to deactivated lines. I am happy...

Is there a way to lower case all variable and non-intrinsic function names with fprettify, and if not, could there be? I'm trying to automate our reformatting of Fortran code...

This PR makes the space after '!\$' in the OMP directive re match optional, so that it will cover the use case of `!$OMP`, i.e., no space.