1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- [MESSAGES CONTROL]
- # bad-whitespace: This rule is violated so often, it hides more important warnings.
- # dangerous-default-value: No elegant alternative to {}; modifying arguments is a bad idea anyway,
- # unless it is explicitly documented as the purpose of the function.
- # missing-docstring: Maybe later.
- # multiple-statements: Maybe later.
- # star-args: Not inherently bad, use with care though.
- # too-many-public-methods: Impractical: some wxWidgets base classes have lots of methods.
- disable=bad-whitespace, dangerous-default-value, missing-docstring, multiple-statements, star-args, too-many-public-methods
- [BASIC]
- # List of builtins function names that should not be used, separated by a comma
- bad-functions=apply,input,file
- # Regular expression matching correct function names
- function-rgx=[a-z_][A-Za-z0-9_]{2,30}$
- # Regular expression matching correct variable names
- variable-rgx=[a-z_][A-Za-z0-9_]{0,30}$
- # Regular expression matching correct constant names
- const-rgx=(([A-Za-z_][A-Za-z0-9_]*)|(__.*__))$
- # Regular expression matching correct attribute names
- attr-rgx=[a-z_][A-Za-z0-9_]{2,30}$
- # Regular expression matching correct argument names
- argument-rgx=[a-z_][A-Za-z0-9_]{0,30}$
- # Regular expression matching correct method names
- method-rgx=[a-z_][A-Za-z0-9_]{2,40}$|(On|Mac)[A-Z][A-Za-z0-9_]{2,30}$
- [VARIABLES]
- # A regular expression matching the name of dummy variables (i.e. expectedly
- # not used).
- dummy-variables-rgx=_$|dummy|event
- [FORMAT]
- # Maximum number of characters on a single line.
- max-line-length=160
- # Maximum number of lines in a module
- max-module-lines=2000
- [DESIGN]
- # To see only the most serious offenders, I set these limits to twice the default.
- # Maximum number of arguments for function / method
- max-args=10
- # Maximum number of locals for function / method body
- max-locals=30
- # Maximum number of return / yield for function / method body
- max-returns=12
- # Maximum number of branch for function / method body
- max-branches=24
- # Maximum number of statements in function / method body
- max-statements=100
- # Maximum number of attributes for a class (see R0902).
- max-attributes=14
|