Skip to content

Commit

Permalink
[doc] update CONTRIBUTING.md (wenet-e2e#183)
Browse files Browse the repository at this point in the history
* [doc] update CONTRIBUTING.md

* add pics
  • Loading branch information
jschenxiaoyu authored Feb 24, 2021
1 parent 55f1f37 commit a67082a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,33 @@

You'll need to install flake8 first.

`pip install flake8==3.8.2`

We use flake8 to perform additional formatting and semantic checking of code.
We provide a pre-commit git hook for performing these checks, before a commit
is created:

```bash
ln -s ../../tools/git-pre-commit .git/hooks/pre-commit
```

You have to execute above command in wenet project root directory.
After that, each commit will be checked by flake8.

If you do not set pre-commit, just run `flake8` in wenet project root directory
and fix all the problems.

## Github checks

After a pull request is submitted, some checks will run to check your code style.

Below is an example where some checks fail.

![github checks](docs/images/checks.png)

You need to click the details to see the detailed info like the example below.

![github checks](docs/images/check_detail.png)

You have to fix all style problems according to the detailed info.

Binary file added docs/images/check_detail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/checks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a67082a

Please sign in to comment.