From 76352bc0144666db633d4f80298eeda3d9181708 Mon Sep 17 00:00:00 2001 From: Dheeraj Peri Date: Mon, 15 Aug 2022 09:23:26 -0700 Subject: [PATCH] chore: Fix contributing doc Signed-off-by: Dheeraj Peri --- CONTRIBUTING.md | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7c5014945d..543ed9309e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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