Formatting options: all the settings, with their defaults, and the modes they take. The modules that apply them (ffmt_whitespace, ffmt_case, ffmt_relational, ffmt_layout) use this module, not the other way round, so it depends on nothing.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | CASE_KEEP | = | 0 |
leave the case as it is |
| integer, | public, | parameter | :: | CASE_LOWER | = | 1 |
lowercase |
| integer, | public, | parameter | :: | CASE_UPPER | = | 2 |
uppercase |
| integer, | public, | parameter | :: | CONT_ALIGN | = | 1 |
align continuation lines with the first item after the
innermost open bracket, or after the first |
| integer, | public, | parameter | :: | CONT_INDENT | = | 2 |
indent continuation lines by a fixed amount |
| integer, | public, | parameter | :: | REL_KEEP | = | 0 |
leave the spelling as it is |
| integer, | public, | parameter | :: | REL_LETTERS | = | 2 |
|
| integer, | public, | parameter | :: | REL_SYMBOLS | = | 1 |
|
| integer, | public, | parameter | :: | WS_ADD | = | 1 |
at least one blank on each side |
| integer, | public, | parameter | :: | WS_KEEP | = | 0 |
leave the blanks as they are |
| integer, | public, | parameter | :: | WS_REMOVE | = | 2 |
no blanks |
Letter case of keywords, dot operators and logical constants, intrinsic procedures, the constants of the intrinsic modules, and kinds.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | constants | = | CASE_KEEP |
constants and types of |
|
| integer, | public | :: | keywords | = | CASE_KEEP |
|
|
| integer, | public | :: | operators | = | CASE_KEEP |
|
|
| integer, | public | :: | procedures | = | CASE_KEEP |
intrinsic procedures where they are called: |
|
| integer, | public | :: | types | = | CASE_KEEP |
suffixes |
All options that control formatting. The defaults give 4-space indentation with the bodies of modules and programs not indented, and aligned continuation lines.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | base_indent | = | 0 |
columns added to the indentation of every line, so that even program units are indented (4 for code that starts in column 5) |
|
| integer, | public | :: | comment_spacing | = | -1 |
blanks before a trailing comment, or -1 to keep them; comments aligned with one on the line before or after are kept |
|
| integer, | public | :: | continuation | = | CONT_ALIGN |
layout of continuation lines ( |
|
| integer, | public | :: | continuation_indent | = | 4 |
extra indentation of continuation lines, used with |
|
| integer, | public | :: | indent | = | 4 |
spaces per indentation level |
|
| logical, | public | :: | indent_comments | = | .true. |
re-indent comment lines like the code around them |
|
| logical, | public | :: | indent_fypp | = | .false. |
indent the code inside fypp blocks ( |
|
| logical, | public | :: | indent_procedures | = | .true. |
indent the bodies of subroutines and functions |
|
| logical, | public | :: | indent_units | = | .false. |
indent the bodies of modules, submodules and main programs |
|
| logical, | public | :: | keep_column1_comments | = | .false. |
leave comment lines that start in column 1 there (with
|
|
| type(case_options_t), | public | :: | letter_case |
letter case of keywords and operators |
|||
| integer, | public | :: | line_length | = | 132 |
maximum line length (0 for no limit). Alignment that would make a line longer falls back to a smaller indentation. |
|
| integer, | public | :: | relational | = | REL_KEEP |
spelling of relational operators: |
|
| logical, | public | :: | sort_use | = | .false. |
sort the |
|
| logical, | public | :: | sort_use_only | = | .false. |
sort the names in |
|
| type(whitespace_options_t), | public | :: | spaces |
whitespace rules within lines |
|||
| logical, | public | :: | split_lines | = | .true. |
split code lines that are longer than |
Modes of the whitespace rules. The defaults follow the most common style in practice where it is clear-cut, and keep the rest.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | assignment | = | WS_ADD |
|
|
| integer, | public | :: | comma | = | WS_KEEP |
|
|
| integer, | public | :: | concat | = | WS_REMOVE |
|
|
| integer, | public | :: | conditional | = | WS_ADD |
|
|
| integer, | public | :: | control_paren | = | WS_ADD |
between |
|
| integer, | public | :: | declarations | = | WS_ADD |
|
|
| integer, | public | :: | defined_operators | = | WS_KEEP |
binary user-defined operators: |
|
| integer, | public | :: | keyword_args | = | WS_REMOVE |
|
|
| integer, | public | :: | logical | = | WS_KEEP |
|
|
| integer, | public | :: | mult_div | = | WS_KEEP |
binary |
|
| integer, | public | :: | percent | = | WS_REMOVE |
|
|
| integer, | public | :: | plus_minus | = | WS_KEEP |
binary |
|
| integer, | public | :: | pointer | = | WS_ADD |
|
|
| integer, | public | :: | power | = | WS_REMOVE |
|
|
| integer, | public | :: | relational | = | WS_KEEP |
|
|
| integer, | public | :: | slice_colon | = | WS_REMOVE |
|