gerrit/contrib/.pep8rc
David Pursehouse 2e082bf215 Add configuration file for PEP-8 checker tool
The PEP-8 checker tool (pep8.py) [1, 2] is used to check that Python
scripts follow the Style Guide for Python Code [3].

This change adds a configuration file for that tool.  The configuration
overrides the defaults for the following settings:

To make it easier to see what's wrong, enable:

  - Quote the lines on which violations are found
  - Quote the relevant section of the PEP-8 guideline

The maximum line length according to PEP-8 is 80 characters, but for
some reason the checker defaults to 79, therefore:

  - Set maximum line length to 80 characters

According to PEP-8, code should be indented at 4 characters, but the
Google Python Style Guide [4] says 2.  Code in Gerrit follows the
Google style, so:

  - Disable warnings "Indentation is not a multiple of four"

The configuration is invoked with the --config option when running
the check tool:

  $ pep8.py --config ./contrib/.pep8rc myfile.py

[1] https://github.com/jcrocholl/pep8
[2] https://pypi.python.org/pypi/pep8
[3] http://www.python.org/dev/peps/pep-0008/
[4] http://google-styleguide.googlecode.com/svn/trunk/pyguide.html

Change-Id: If02dd9e51cf3a6e0c0238e78bcfad1d7081de742
2013-05-17 14:35:47 +09:00

6 lines
83 B
Plaintext

[pep8]
max_line_length = 80
show_pep8 = True
show_source = True
ignore = E111,E121