diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-10-08 19:44:47 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-10-08 19:44:47 +0900 |
commit | 350c67968b3033f37d0c3fcedede98559e5bb1d3 (patch) | |
tree | 905705842c2eb64381a6d89e121e913945de40a1 /CONTRIBUTING.rst | |
parent | 674afe9423d991a91b36fd15902db9027b46e6a6 (diff) | |
download | buildstream-350c67968b3033f37d0c3fcedede98559e5bb1d3.tar.gz |
CONTRIBUTING.rst: Added section in PEP-8 coding style about line lengths.
We have a long line limit in order to handle the exceptions without making
code unreadable as a result, this long line length limit is not an invitation
to fill up the limit as much as possible.
Diffstat (limited to 'CONTRIBUTING.rst')
-rw-r--r-- | CONTRIBUTING.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 6493979f0..83a8a4a05 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -192,6 +192,21 @@ code readability by being overly restrictive on line length for instance. The pep8 linter will run automatically when :ref:`running the test suite <contributing_testing>`. +Line lengths +'''''''''''' +Regarding laxness on the line length in our linter settings, it should be clarified +that the line length limit is a hard limit which causes the linter to bail out +and reject commits which break the high limit - not an invitation to write exceedingly +long lines of code, comments, or API documenting docstrings. + +Code, comments and docstrings should strive to remain written for approximately 80 +or 90 character lines, where exceptions can be made when code would be less readable +when exceeding 80 or 90 characters (often this happens in conditional statements +when raising an exception, for example). Or, when comments contain a long link that +causes the given line to to exceed 80 or 90 characters, we don't want this to cause +the linter to refuse the commit. + + .. _contributing_documenting_symbols: Documenting symbols |