Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style guide (see #3) #42

Merged
merged 14 commits into from
Dec 31, 2019
Merged
12 changes: 6 additions & 6 deletions STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ This style guide is a living document and proposed changes may be adopted after

## File naming conventions

* Source files should contain at most one `program`, `module`, or `submodule`.
* The filename should match the program or module name and have the file extension `.f90` or `.F90` if preprocessing is required.
* Source files should contain at most one `program`, `module`, or `submodule`
* The filename should match the program or module name and have the file extension `.f90` or `.F90` if preprocessing is required
zbeekman marked this conversation as resolved.
Show resolved Hide resolved
* If the interface and implementation is split using submodules the implementation submodule file should have the same name as the
interface (parent) module but end in `_implementation`.
interface (parent) module but end in `_implementation`
E.g., `string_class.f90` and `string_class_implementation.f90`
* Tests should be added in the `tests` subdirectory and have the same name as the module they are testing with the `test_` prefix
added.
added
E.g., `string_class.f90` and `tests/test_string_class.f90`
* There should only ever be one `program` and `module` statement per file.
* There should only ever be one `program` and `module` statement per file

## Indentation & whitespace

By setting and following a convention for indentation and whitespace, code reviews and git-diffs can
focus on the semantics of the proposed changes rather than style and formatting.

* The body of every Fortran construct should be indented by __4 spaces__
* Line length *should be limited to 80 characters* and __must not exceed 132__.
* Line length *should be limited to 80 characters* and __must not exceed 132__
* Please do not use <kbd>Tab</kbd> characters for indentation
* Please remove trailing white space before committing code

Expand Down