Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: flake8-abp/README.md

Issue 29340727: Noissue - Added flake8 extension accounting for our coding style and some other stuff (Closed)
Patch Set: Addressed comments, fixed two bugs, use ascii() Created May 9, 2016, 4:47 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « .hgignore ('k') | flake8-abp/flake8_abp.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: flake8-abp/README.md
===================================================================
new file mode 100644
--- /dev/null
+++ b/flake8-abp/README.md
@@ -0,0 +1,53 @@
+# flake8-abp
+
+A [flake8](https://flake8.readthedocs.io) extension that checks for compliance
+with the [Adblock Plus coding style guide](https://adblockplus.org/coding-style#python)
+and some bad practices which flake8 doesn't handle by default.
+
+
+## Installation
+
+Run `python setup.py install`.
+
+
+## Usage
+
+Just run `flake8` (you have to install it seperately) on your source files.
+After installation the `flake8-abp` extension is active by default.
+
+
+## Warnings
+
+### Readability and consistency
+
+* `A101`: Loop over a tuple or set literal; use lists for data that have order
+* `A102`: Membership check on a tuple or list literal; use a set here
+* `A103`: Yoda condition
+* `A104`: `map()` or `filter()` called with lambda function
+* `A105`: Type called with literal or comprehension where a
+ literal/comprehension of that type can be used directly
+* `A106`: Use augment assignment
+* `A107`: `%` operator used for string formatting; this mechanism
+ has been superseded by the string's `format()` method
+* `A108`: `+` operator to concatenate more than two strings
+* `A109`: Use triple double quotes for docstrings as recommended in PEP-257
+* `A110`: Write single-line string literals as represented by `repr()`
+* `A111`: Redundant parantheses around if or while condition
+
+
+### Redundancy and complexity
+
+* `A201`: Redundant or superfluos `global` or `nonlocal` declaration
+* `A202`: Dead code after block is left
+* `A303`: Unused expression
+* `A204`: Redundant or superfluos pass statement
+* `A205`: Superfluos empty block
+* `A206`: Extraneous `else` statement after block is left
+* `A207`: Duplicate key in dict or set
+
+
+### Error-prone practices
+
+* `A301`: Discouraged APIs
+* `A302`: Redefinition of built-in name
+* `A303`: Non-default source file encoding
« no previous file with comments | « .hgignore ('k') | flake8-abp/flake8_abp.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld