Skip to content

Commit

Permalink
Add lintrunner instructions to contributing guide (pytorch#397)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#397

tsia

Reviewed By: colin2328

Differential Revision: D36908437

fbshipit-source-id: e5859b4bc2c13c28f230463051b6ccd58920e01a
  • Loading branch information
joshuadeng authored and facebook-github-bot committed Jun 3, 2022
1 parent 31e9e41 commit 735396e
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,24 @@ We actively welcome your pull requests.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Make sure your code lints.
5. Make sure your code lints. You can use [lintrunner](https://github.com/pytorch/pytorch/wiki/lintrunner) to do so.
1. To set up:
```
pip install lintrunner
lintrunner init
```
2. To lint your local changes:
```
lintrunner
```
3. To format locally changed files:
```
lintrunner f
```
4. To lint all files:
```
lintrunner --all-files
```
6. If you haven't already, complete the Contributor License Agreement ("CLA").
## Contributor License Agreement ("CLA")
Expand Down

0 comments on commit 735396e

Please sign in to comment.