Skip to content

Commit a1efc3e

Browse files
committed
Update CONTRIBUTING.md with test/coverage info
1 parent b3e278c commit a1efc3e

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

CONTRIBUTING.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ Looking to contribute something to [json-fortran](README.md)? **Here's how you c
3232
## Outstanding Work
3333

3434
- Take a look at the [issues](https://github.com/jacobwilliams/json-fortran/issues) to see if there is an issue you'd like to help address. [Issues](https://github.com/jacobwilliams/json-fortran/issues) with the [ready label](https://github.com/jacobwilliams/json-fortran/issues?q=is%3Aopen+is%3Aissue+label%3A%22ready%22) or in the [ready column on waffle.io](https://waffle.io/jacobwilliams/json-fortran) are issues that are ready to be dealt with. (i.e., They are not blocked by other dependencies and are higher priority.)
35+
- Increasing the test coverage is another helpful way to
36+
contribute. Please take a look at
37+
[this wiki page](https://github.com/jacobwilliams/json-fortran/wiki/Coverage-Analysis)
38+
for a list of uncovered procedures, and at the
39+
[Codecov.io suggestions page](https://codecov.io/github/jacobwilliams/json-fortran/features/suggestions)
40+
to find procedures and lines of code that are still uncovered by the
41+
[unit tests](https://github.com/jacobwilliams/json-fortran/tree/master/src/tests). It
42+
is worth pointing out that the majority of uncovered procedures are
43+
internal, overloaded procedures and can only be exercised by calling
44+
the corresponding generic procedure with input arguments that will
45+
resolve to the specific procedure in question. Let's keep the
46+
following graph trending upwards!
47+
![Codecov.io](http://codecov.io/github/jacobwilliams/json-fortran/branch.svg?branch=master)
3548

3649
[top](#contributing-to-json-fortran)
3750
## Pull Requests
@@ -40,7 +53,7 @@ Looking to contribute something to [json-fortran](README.md)? **Here's how you c
4053
- Pull requests should address one issue at a time, and each commit should be a set of self contained, related changes. If you forget something in a commit, please use `git rebase -i <ref>^` to amend and/or squash erroneous commits. Here `<ref>` is the reference to to oldest commit needing to be modified (SHA, or `HEAD~4`, etc.)
4154
- Each commit should compile, and ideally pass the tests. Very complicated new features or fixes, may have commits that don't pass tests, if otherwise the commit history would include far to many changes in any given commit. Use an interactive rebase to fix any of these issues, as described above.
4255
- Pull requests should always be based on the upstream master,
43-
jacobwilliams/json-fortran:master. Please `rebase` your branch on top
56+
`jacobwilliams/json-fortran:master`. Please `rebase` your branch on top
4457
of the latest upstream master. Assuming you are on your branch and you've added the upstream remote by running something like:
4558
```
4659
git remote add upstream git://github.com/jacobwilliams/json-fortran.git
@@ -60,6 +73,19 @@ git rebase upstream/master
6073
- Each commit should address a single logical change and code base transformation.
6174
- Each commit **must** compile.
6275
- Each commit should pass the tests unless the feature being implemented or bug being fixed requires extensive changes that would result in a commit with too many different changes.
76+
- Each pull request should ensure that the proper unit tests have
77+
been added to cover at least 90% of new or changed code and that the
78+
overall coverage continues to increase.
79+
- New tests are added to the `src/tests` directory and are named
80+
`jf_test_<#>.[Ff]90`. Each test is a stand alone Fortran program
81+
which will automatically be compiled and linked against the
82+
json-fortran library so long as it follows this naming
83+
convention. If any of the tests fail, the test program should exit
84+
with a non-zero return status, using the `stop 2` intrinsic
85+
statement. (The Fortran standard does not require the 'processor' to
86+
have or set a return value, but in practice all compilers respect
87+
this convention. An integer other than `2` may be used, so long as
88+
it is non-zero and supported by the processor.)
6389
- No extraneous white spaces are allowed to be introduced at line endings and all non binary files should end with a single new line. Run `git config core.whitespace trailing-space,space-before-tab,blank-at-eol,blank-at-eof` to setup the whitespace rules from within your fork, and then check for white space errors with `git diff --check` to see if you have accidentally introduced white space errors before committing. (You can also enable the sample `pre-commit` hook that ships with git, to prevent you from committing changes that introduce white space errors. See [this stackoverflow question](http://stackoverflow.com/questions/591923/make-git-automatically-remove-trailing-whitespace-before-committing/28446440)) for some tips on preventing the introduction of whitespace errors.
6490
- Please adhere to the code indentation and formatting as it currently exists, aligning common elements vertically, etc. Tab characters are not allowed. Indentations should be done with *4* space characters.
6591
- *Do NOT* allow your editor to make a bunch of indentation or white space changes, that will introduce non-substantive changes on lines that you have not actually edited.

0 commit comments

Comments
 (0)