Skip to content

Commit a64a3ac

Browse files
authored
Merge pull request #1268 from pytorch/contrib_docs
chore: Fix contributing doc
2 parents 06de861 + 76352bc commit a64a3ac

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,12 @@ We use the PyTorch Slack for communication about core development, integration w
1818

1919
- We generally follow the coding guidelines used in PyTorch
2020

21-
- Use the built in linting tools to ensure that your code matches the style guidelines
22-
```sh
23-
# C++ Linting (After installing clang-format [Version 9.0.0])
24-
# Print non-conforming sections of code
25-
bazel run //tools/linter:cpplint_diff -- //...
26-
# Modify code to conform with style guidelines
27-
bazel run //tools/linter:cpplint -- //...
28-
29-
# Python Linting
30-
# Print non-conforming sections of code
31-
bazel run //tools/linter:pylint_diff -- //...
32-
# Modify code to conform with style guidelines
33-
bazel run //tools/linter:pylint -- //...
34-
```
21+
- Linting your code is essential to ensure code matches the style guidelines.
22+
To begin with, please install the following dependencies
23+
* `pip install -r requirements-dev.txt`
24+
* Install Bazel buildifier https://github.com/bazelbuild/buildtools/blob/master/buildifier/README.md#setup
25+
26+
Once the above dependencies are installed, `git commit` command will perform linting before committing your code.
3527

3628
- Avoid introducing unnecessary complexity into existing code so that maintainability and readability are preserved
3729

0 commit comments

Comments
 (0)