| Source files should not have any duplicated blocks |
n/a |
| Failed unit tests should be fixed |
n/a |
| Skipped unit tests should be either removed or fixed |
n/a |
| Lines should have sufficient coverage by unit tests |
Coverage: 80% |
| Branches should have sufficient coverage by unit tests |
Coverage: 80% |
| Source files should have a sufficient density of comment lines |
25% |
| Backticks should not be used |
n/a |
| Files should not be too complex |
McCabe: 150 |
| Classes should not be too complex |
McCabe: 100 |
| Functions should not be too complex |
McCabe: 10 |
| "<>" should not be used to test inequality |
n/a |
| Parser failure |
n/a |
| The "exec" statement should not be used |
n/a |
| Pre-increment and pre-decrement should not be used |
n/a |
| The "print" statement should not be used |
n/a |
| Files should not have too many lines |
Lines: 1000 |
| Collapsible "if" statements should be merged |
n/a |
| Functions, methods and lambdas should not have too many parameters |
Parameters: 10 |
| Nested blocks of code should not be left empty |
n/a |
| Useless parentheses around expressions should be removed to prevent any misunderstanding |
n/a |
| "FIXME" tags should be handled |
n/a |
| Functions should not contain too many return statements |
Returns: 3 |
| Sections of code should not be "commented out" |
n/a |
| IP addresses should not be hardcoded |
n/a |
| Control flow statements "if", "for", "while", "try" and "with" should not be nested too deeply |
Nest Levels: 4 |
| Class names should comply with a naming convention |
^[A-Z_][a-zA-Z0-9]+$ |
| Method names should comply with a naming convention |
^[a-z_][a-z0-9_]{2,30}$ |
| Function names should comply with a naming convention |
^[a-z_][a-z0-9_]{2,30}$ |
| Field names should comply with a naming convention |
^[_a-z][_a-z0-9]*$ |
| Local variable and function parameter names should comply with a naming convention |
^[a-z][a-z0-9]*$ |
| Module names should comply with a naming convention |
(([a-z_][a-z0-9_]*) |
| A field should not duplicate the name of its containing class |
n/a |
| "break" and "continue" should not be used outside a loop |
n/a |
| "" should only be used as an escape character outside of raw strings |
n/a |
| Docstrings should be defined |
Every module, function, class, or method |
| Parentheses should not be used after certain keywords |
assert, del, elif, except, for, if, in, not, raise, return, while, and yield |
| New-style classes should be used |
n/a |
| Jump statements should not be followed by other statements |
Jumps: return, break, continue, and raise |
| Two branches in the same conditional structure should not have exactly the same implementation |
n/a |
| Methods that don't access instance data should be "static" |
n/a |
| "yield" and "return" should not be used outside functions |
n/a |
| "pass" should not be used needlessly |
n/a |
| No use of if/else on single line outside of comprehension |
n/a |
The next step is to define each rule in non @jasonamyers terms and create time to fix tech debt numbers for each issue