Skip to content

Commit 15b9534

Browse files
committed
where suitable, limit line length to 80 characters
In line with rule MD013 of markdownlint[1] and where perceived as suitable, lines were constrained to 80 characters. [1] https://github.com/markdownlint/markdownlint, version 0.12.0 Signed-off-by: Norwid Behrnd <[email protected]>
1 parent d6d24a8 commit 15b9534

File tree

1 file changed

+33
-11
lines changed

1 file changed

+33
-11
lines changed

README.md

+33-11
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,25 @@
66
![PyPI](https://img.shields.io/pypi/v/fprettify)
77
[![Code Climate](https://codeclimate.com/github/pseewald/fprettify/badges/gpa.svg)](https://codeclimate.com/github/pseewald/fprettify)
88

9-
fprettify is an auto-formatter for modern Fortran code that imposes strict whitespace formatting, written in Python.
9+
fprettify is an auto-formatter for modern Fortran code that imposes strict
10+
whitespace formatting, written in Python.
1011

1112
**NOTE:** I'm looking for help to maintain this repository, see [#127](https://github.com/pseewald/fprettify/issues/127).
1213

1314
## Features
1415

1516
- Auto-indentation.
16-
- Line continuations are aligned with the previous opening delimiter `(`, `[` or `(/` or with an assignment operator `=` or `=>`. If none of the above is present, a default hanging indent is applied.
17+
- Line continuations are aligned with the previous opening delimiter `(`, `[` or
18+
`(/` or with an assignment operator `=` or `=>`. If none of the above is
19+
present, a default hanging indent is applied.
1720
- Consistent amount of whitespace around operators and delimiters.
1821
- Removal of extraneous whitespace and consecutive blank lines.
1922
- Change letter case (upper case / lower case conventions) of intrinsics
2023
- Tested for editor integration.
21-
- By default, fprettify causes whitespace changes only and thus preserves revision history.
22-
- fprettify can handle cpp and [fypp](https://github.com/aradi/fypp) preprocessor directives.
24+
- By default, fprettify causes whitespace changes only and thus preserves
25+
revision history.
26+
- fprettify can handle cpp and [fypp](https://github.com/aradi/fypp)
27+
preprocessor directives.
2328

2429
## Limitations
2530

@@ -29,11 +34,14 @@ fprettify is an auto-formatter for modern Fortran code that imposes strict white
2934
## Requirements
3035

3136
- Python 3 (Python 2.7 no longer supported)
32-
- [ConfigArgParse](https://pypi.org/project/ConfigArgParse): optional, enables use of config file
37+
- [ConfigArgParse](https://pypi.org/project/ConfigArgParse): optional, enables
38+
use of config file
3339

3440
## Examples
3541

36-
Compare `examples/*before.f90` (original Fortran files) with `examples/*after.f90` (reformatted Fortran files) to see what fprettify does. A quick demonstration:
42+
Compare `examples/*before.f90` (original Fortran files) with
43+
`examples/*after.f90` (reformatted Fortran files) to see what fprettify does. A
44+
quick demonstration:
3745

3846
```Fortran
3947
program demo
@@ -93,9 +101,11 @@ Autoformat file1, file2, ... inplace by
93101
fprettify file1, file2, ...
94102
```
95103

96-
The default indent is 3. If you prefer something else, use `--indent n` argument.
104+
The default indent is 3. If you prefer something else, use `--indent n`
105+
argument.
97106

98-
In order to apply fprettify recursively to an entire Fortran project instead of a single file, use the `-r` option.
107+
In order to apply fprettify recursively to an entire Fortran project instead of
108+
a single file, use the `-r` option.
99109

100110
For more options, read
101111

@@ -111,15 +121,23 @@ For editor integration, use
111121
fprettify --silent
112122
```
113123

114-
For instance, with Vim, use fprettify with `gq` by putting the following commands in your `.vimrc`:
124+
For instance, with Vim, use fprettify with `gq` by putting the following
125+
commands in your `.vimrc`:
115126

116127
```vim
117128
autocmd Filetype fortran setlocal formatprg=fprettify\ --silent
118129
```
119130

120131
## Deactivation and manual formatting (experimental feature)
121132

122-
fprettify can be deactivated for selected lines: a single line followed by an inline comment starting with `!&` is not auto-formatted and consecutive lines that are enclosed between two comment lines `!&<` and `!&>` are not auto-formatted. This is useful for cases where manual alignment is preferred over auto-formatting. Furthermore, deactivation is necessary when non-standard Fortran syntax (such as advanced usage of preprocessor directives) prevents proper formatting. As an example, consider the following snippet of fprettify formatted code:
133+
fprettify can be deactivated for selected lines: a single line followed by an
134+
inline comment starting with `!&` is not auto-formatted and consecutive lines
135+
that are enclosed between two comment lines `!&<` and `!&>` are not
136+
auto-formatted. This is useful for cases where manual alignment is preferred
137+
over auto-formatting. Furthermore, deactivation is necessary when non-standard
138+
Fortran syntax (such as advanced usage of preprocessor directives) prevents
139+
proper formatting. As an example, consider the following snippet of fprettify
140+
formatted code:
123141

124142
```fortran
125143
A = [-1, 10, 0, &
@@ -147,4 +165,8 @@ A = [-1, 10, 0, &
147165

148166
## Contributing / Testing
149167

150-
The testing mechanism allows you to easily test fprettify with any Fortran project of your choice. Simply clone or copy your entire project into `fortran_tests/before` and run `python setup.py test`. The directory `fortran_tests/after` contains the test output (reformatted Fortran files). If testing fails, please submit an issue!
168+
The testing mechanism allows you to easily test fprettify with any Fortran
169+
project of your choice. Simply clone or copy your entire project into
170+
`fortran_tests/before` and run `python setup.py test`. The directory
171+
`fortran_tests/after` contains the test output (reformatted Fortran files). If
172+
testing fails, please submit an issue!

0 commit comments

Comments
 (0)