summary refs log tree commit diff
path: root/CONTRIBUTING.rst
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-11-05 17:08:07 +0000
committerGitHub <noreply@github.com>2019-11-05 17:08:07 +0000
commit55a7da247a912ca2a4d539a63200fca0d6541f46 (patch)
treec0445991317e3dc26def157bfeb70d76d1b830c5 /CONTRIBUTING.rst
parentApply suggestions from code review (diff)
parentImprove documentation for EventContext fields (#6319) (diff)
downloadsynapse-55a7da247a912ca2a4d539a63200fca0d6541f46.tar.xz
Merge branch 'develop' into rav/url_preview_limit_title
Diffstat (limited to 'CONTRIBUTING.rst')
-rw-r--r--CONTRIBUTING.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst

index a71a4a696b..df81f6e54f 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst
@@ -58,10 +58,29 @@ All Matrix projects have a well-defined code-style - and sometimes we've even got as far as documenting it... For instance, synapse's code style doc lives at https://github.com/matrix-org/synapse/tree/master/docs/code_style.md. +To facilitate meeting these criteria you can run ``scripts-dev/lint.sh`` +locally. Since this runs the tools listed in the above document, you'll need +python 3.6 and to install each tool. **Note that the script does not just +test/check, but also reformats code, so you may wish to ensure any new code is +committed first**. By default this script checks all files and can take some +time; if you alter only certain files, you might wish to specify paths as +arguments to reduce the run-time. + Please ensure your changes match the cosmetic style of the existing project, and **never** mix cosmetic and functional changes in the same commit, as it makes it horribly hard to review otherwise. +Before doing a commit, ensure the changes you've made don't produce +linting errors. You can do this by running the linters as follows. Ensure to +commit any files that were corrected. + +:: + # Install the dependencies + pip install -U black flake8 isort + + # Run the linter script + ./scripts-dev/lint.sh + Changelog ~~~~~~~~~