add hacking preamble
The current hacking rules read too much like the 10 commandments, with no context. Context is important. Change-Id: Id10897eebe3cdb8d00a12b453d1133d2f8768d85
This commit is contained in:
parent
cb2f709573
commit
5c57c4ec64
12
HACKING.rst
12
HACKING.rst
|
@ -1,10 +1,22 @@
|
|||
OpenStack Style Guidelines
|
||||
==========================
|
||||
|
||||
OpenStack has a set of style guidelines for clarity. OpenStack is a
|
||||
very large code base (over 1 Million lines of python), spanning dozens
|
||||
of git trees, with over a thousand developers contributing every 12
|
||||
months. As such common style helps developers understand code in
|
||||
reviews, move between projects smoothly, and overall make the code
|
||||
more maintainable.
|
||||
|
||||
|
||||
Step 0
|
||||
------
|
||||
|
||||
- Step 1: Read http://www.python.org/dev/peps/pep-0008/
|
||||
- Step 2: Read http://www.python.org/dev/peps/pep-0008/ again
|
||||
- Step 3: Read on
|
||||
|
||||
|
||||
General
|
||||
-------
|
||||
- [H903] Use only UNIX style newlines (``\n``), not Windows style (``\r\n``)
|
||||
|
|
13
README.rst
13
README.rst
|
@ -41,6 +41,19 @@ Each check is a pep8 plugin so read
|
|||
|
||||
- https://github.com/jcrocholl/pep8/blob/master/docs/developer.rst#contribute
|
||||
|
||||
The focus of new or changed rules should be to do one of the following
|
||||
|
||||
- Substantially increase the reviewability of the code (eg: H301,2,3
|
||||
as they make it easy to understand where symbols come from)
|
||||
- Catch a common programming error that may arrise in the future (H201)
|
||||
- Prevent a situation that would 100% of the time be -1ed by
|
||||
developers (H903)
|
||||
|
||||
But, as always, remember that these are Guidelines. Treat them as
|
||||
such. There are always times for exceptions. All new rules should
|
||||
support noqa.
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
- The check must already have community support. We do not want to dictate style, only enforce it.
|
||||
|
|
Loading…
Reference in New Issue