From fa693843bc22eb272ec357d13d71cbfa0582d235 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 1 Sep 2021 19:43:04 +0530 Subject: [PATCH] Add note about backport and linting --- Pull-Request-Checklist.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Pull-Request-Checklist.md b/Pull-Request-Checklist.md index 9ca7276..20f7cb0 100644 --- a/Pull-Request-Checklist.md +++ b/Pull-Request-Checklist.md @@ -87,4 +87,21 @@ For bug and security fixes, parallel pull requests must be sent to all [supporte For example, if you fix a bug in v11 (`hotfix` branch), then you must also cherry-pick the commit and send another pull request on the `develop` branch. -Note: It is better to send backport pull request once your main pull request gets approved. +If your fixes are small, you might not need a manual backport. Leave a note in your PR description or comment that PR can be squashed and backported to stable versions. Read more on automated backports here: https://github.com/frappe/backport#how-to-use + +Note: It is better to send backport pull requests once your main pull request gets approved. + +### Linting + +This repository uses https://pre-commit.com/ to ensure that basic code style and correctness requirements are met before merging any PRs. While the suite of linting/formatting tools might keep evolving you just need to install `pre-commit` to get started. It will install and configure required tools. + +- `pip install pre-commit` +- `pre-commit install` (from ERPNext repository folder) + +This will configure a git pre-commit hook which will ensure that your changes pass bare-minimum style/correctness requirements. + +![pre-commit](https://user-images.githubusercontent.com/9079960/131657035-f43d6324-131a-4337-9cb0-587edba33e73.png) + +Current checks: +- Flake8 (correctness) +- Whitespace trimming (style) \ No newline at end of file