Skip to content

Commit

Permalink
[lint doc] how to fix flake errors if pre-commit hook wasn't there (p…
Browse files Browse the repository at this point in the history
…ytorch#49345)

Summary:
This PR adds instructions on what to do if one committed into a PR branch w/o having a pre-commit hook enabled and having CI report flake8 errors.

Pull Request resolved: pytorch#49345

Reviewed By: cpuhrsch

Differential Revision: D25683167

Pulled By: soumith

fbshipit-source-id: 3c45c866e1636c116d2cacec438d62c860e6b854
  • Loading branch information
stas00 authored and facebook-github-bot committed Dec 23, 2020
1 parent 55b431b commit 5171bd9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,16 @@ You'll need to install an appropriately configured flake8; see
[Lint as you type](https://github.com/pytorch/pytorch/wiki/Lint-as-you-type)
for documentation on how to do this.
If you haven't set up the pre-commit hook and have already committed files and
CI reports `flake8` errors, you can run the check locally in your PR branch with:
```bash
flake8 $(git diff --name-only $(git merge-base --fork-point master))
```
fix the code so that no errors are reported when you re-run the above check again,
and then commit the fix.
## Building PyTorch with ASAN
[ASAN](https://github.com/google/sanitizers/wiki/AddressSanitizer) is very
Expand Down

0 comments on commit 5171bd9

Please sign in to comment.