Skip to content

Commit

Permalink
doc(missing): Add usage examples
Browse files Browse the repository at this point in the history
  • Loading branch information
pkyosx committed May 17, 2022
1 parent 1f4219d commit 3b652dd
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,53 @@
# Missing #
The simple [pre-commit][0] hook to find the missing but necessary files.

A simple [pre-commit][0] hook to find missing `__init__.py` that is required for unit test cases to be discovered.

## Example ##

Default setting, everything except `.git` will be scanned

```yaml
- repo: https://github.com/hardcoretech/missing
rev: v0.2.5
hooks:
- id: missing-init-py
```
Exclude according to .gitignore
```yaml
- repo: https://github.com/hardcoretech/missing
rev: v0.2.5
hooks:
- id: missing-init-py
args:
- --mode
- obey_gitignore
```
Only include git staged files
```yaml
- repo: https://github.com/hardcoretech/missing
rev: v0.2.5
hooks:
- id: missing-init-py
args:
- --mode
- staged_only
```
Exclude frontend and doc folder
```yaml
- repo: https://github.com/hardcoretech/missing
rev: v0.2.5
hooks:
- id: missing-init-py
args:
- --exclude
- frontend
- doc
```
[0]: https://pre-commit.com/

0 comments on commit 3b652dd

Please sign in to comment.