Skip to content

Commit 4ac6dbc

Browse files
Fix/update README options (#35)
* Fix/update README options * Add instructions for including coverage badge in README
1 parent 3ec2173 commit 4ac6dbc

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,19 @@ docstr-coverage some_project/src
5656

5757
#### Options
5858

59-
- _--skipmagic, -m_ - Ignore all magic methods (like `__init__`, and `__str__`)
59+
- _--skipmagic, -m_ - Ignore all magic methods (except `__init__`)
60+
- _--skipinit, -i_ - Ignore all `__init__` methods
6061
- _--skipfiledoc, -f_ - Ignore module docstrings (at the top of files)
6162
- _--skip-private, -P_ - Ignore private functions (starting with a single underscore)
63+
- _--skipclassdef, -c_ - Ignore docstrings of class definitions
6264
- _--exclude=\<regex\>, -e \<regex\>_ - Filepath pattern to exclude from analysis
63-
_ To exclude the contents of a virtual environment `env` and your `tests` directory, run:
64-
<br>```\$ docstr-coverage some_project/ -e "env/_|tests/\*"```
65+
- To exclude the contents of a virtual environment `env` and your `tests` directory, run:
66+
```docstr-coverage some_project/ -e ".*/(env|tests)"```
6567
- _--verbose=\<level\>, -v \<level\>_ - Set verbosity level (0-3)
66-
_ 0 - Silence
67-
_ 1 - Print overall statistics
68-
_ 2 - Also print individual statistics for each file
69-
_ 3 - Also print missing docstrings (function names, class names, etc.)
68+
- 0 - Silence
69+
- 1 - Print overall statistics
70+
- 2 - Also print individual statistics for each file
71+
- 3 - Also print missing docstrings (function names, class names, etc.)
7072
- _--failunder=<int|float>, -F <int|float>_ - Fail if under a certain percentage of coverage (default: 100.0)
7173
- _--docstr-ignore-file=\<filepath\>, -d \<filepath\>_ - Filepath containing list of patterns to ignore. Patterns are (file-pattern, name-pattern) pairs
7274
- File content example:
@@ -79,6 +81,12 @@ docstr-coverage some_project/src
7981
detect_.* get_val.*
8082
```
8183
- _--badge=\<filepath\>, -b \<filepath\>_ - Generate a docstring coverage percent badge as an SVG saved to a given filepath
84+
- Include the badge in a repo's README using
85+
```[![docstr_coverage](<filepath/of/your/saved/badge.svg>)](https://github.com/HunterMcGushion/docstr_coverage)```,
86+
where `<filepath/of/your/saved/badge.svg>` is the path provided to the `--badge` option
87+
- _--followlinks, -l_ - Follow symlinks
88+
- _--percentage-only, -p_ - Output only the overall coverage percentage as a float, silencing all other logging
89+
- _--help, -h_ - Display CLI options
8290

8391
#### Overriding by Comments
8492
Note that `docstr-coverage` can not parse

0 commit comments

Comments
 (0)