Skip to content

chore: Fix contributing doc #1268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,12 @@ We use the PyTorch Slack for communication about core development, integration w

- We generally follow the coding guidelines used in PyTorch

- Use the built in linting tools to ensure that your code matches the style guidelines
```sh
# C++ Linting (After installing clang-format [Version 9.0.0])
# Print non-conforming sections of code
bazel run //tools/linter:cpplint_diff -- //...
# Modify code to conform with style guidelines
bazel run //tools/linter:cpplint -- //...

# Python Linting
# Print non-conforming sections of code
bazel run //tools/linter:pylint_diff -- //...
# Modify code to conform with style guidelines
bazel run //tools/linter:pylint -- //...
```
- Linting your code is essential to ensure code matches the style guidelines.
To begin with, please install the following dependencies
* `pip install -r requirements-dev.txt`
* Install Bazel buildifier https://github.com/bazelbuild/buildtools/blob/master/buildifier/README.md#setup

Once the above dependencies are installed, `git commit` command will perform linting before committing your code.

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

Expand Down