diff options
author | James Ennis <james.ennis@codethink.com> | 2018-03-08 11:06:43 +0000 |
---|---|---|
committer | James Ennis <james.ennis@codethink.com> | 2018-03-14 14:10:26 +0000 |
commit | 7e79c4af662c21868001fc4e392f61cb6b6d45e9 (patch) | |
tree | cf29a5743b83798bc3878f6cd6d49b9e0b756975 /.pylintrc | |
parent | 793780c622e79b281dda0940b4038db91c852e73 (diff) | |
download | buildstream-7e79c4af662c21868001fc4e392f61cb6b6d45e9.tar.gz |
.pylintrc: Amend which warning messages are disabled
NOTE: We have categorised the warning messages into two groups.
Those that are of no use to us in the buildstream project and
those that should be enabled at some point.
Diffstat (limited to '.pylintrc')
-rw-r--r-- | .pylintrc | 169 |
1 files changed, 96 insertions, 73 deletions
@@ -54,79 +54,102 @@ confidence= # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use"--disable=all --enable=classes # --disable=W" -disable=print-statement, - parameter-unpacking, - unpacking-in-except, - old-raise-syntax, - backtick, - long-suffix, - old-ne-operator, - old-octal-literal, - import-star-module-level, - non-ascii-bytes-literal, - raw-checker-failed, - bad-inline-option, - locally-disabled, - locally-enabled, - file-ignored, - suppressed-message, - useless-suppression, - deprecated-pragma, - apply-builtin, - basestring-builtin, - buffer-builtin, - cmp-builtin, - coerce-builtin, - execfile-builtin, - file-builtin, - long-builtin, - raw_input-builtin, - reduce-builtin, - standarderror-builtin, - unicode-builtin, - xrange-builtin, - coerce-method, - delslice-method, - getslice-method, - setslice-method, - no-absolute-import, - old-division, - dict-iter-method, - dict-view-method, - next-method-called, - metaclass-assignment, - indexing-exception, - raising-string, - reload-builtin, - oct-method, - hex-method, - nonzero-method, - cmp-method, - input-builtin, - round-builtin, - intern-builtin, - unichr-builtin, - map-builtin-not-iterating, - zip-builtin-not-iterating, - range-builtin-not-iterating, - filter-builtin-not-iterating, - using-cmp-argument, - eq-without-hash, - div-method, - idiv-method, - rdiv-method, - exception-message-attribute, - invalid-str-codec, - sys-max-int, - bad-python3-import, - deprecated-string-function, - deprecated-str-translate-call, - deprecated-itertools-function, - deprecated-types-field, - next-method-defined, - dict-items-not-iterating, - dict-keys-not-iterating, - dict-values-not-iterating + +# We have two groups of disabled messages: +# +# 1) Messages that are of no use to us +# This is either because we don't follow the convention +# (missing-docstring and protected-access come to mind), or because +# it's not very useful in CI (too-many-arguments, for example) +# +# 2) Messages that we would like to enable at some point +# We introduced linting quite late into the project, so there are +# some issues that just grew out of control. Resolving these would +# be nice, but too much work atm. +# + +disable=##################################### + # Messages that are of no use to us # + ##################################### + , + fixme, + missing-docstring, + no-self-use, + no-else-return, + protected-access, + too-few-public-methods, + too-many-arguments, + too-many-boolean-expressions, + too-many-branches, + too-many-instance-attributes, + too-many-lines, + too-many-locals, + too-many-nested-blocks, + too-many-public-methods, + too-many-statements, + too-many-return-statements, + too-many-ancestors, + + ####################################################### + # Messages that we would like to enable at some point # + ####################################################### + attribute-defined-outside-init, + + # Overriden methods don't actually override but redefine + arguments-differ, + + duplicate-code, + + # Some invalid names are alright, we should configure pylint + # to accept them, and curb the others + invalid-name, + + unused-argument, + unused-import, + unused-variable, + + ########################################################### + # Messages that report warnings which should be addressed # + ########################################################### + + anomalous-backslash-in-string, + bad-continuation, + bare-except, + broad-except, + consider-merging-isinstance, + dangerous-default-value, + global-statement, + len-as-condition, + logging-format-interpolation, + + no-member, + + # We use assert(<>), which should perhaps be assert <> + superfluous-parens, + + # Some of us like type() - should be discouraged + unidiomatic-typecheck, + + # We aren't fully compliant with pep8 import order yet + wrong-import-order, + wrong-import-position, + ungrouped-imports, + unnecessary-pass, + cyclic-import, + + # These are hard to spot without linting, but easy to fix + redefined-argument-from-local, + redefined-builtin, + redefined-outer-name, + + simplifiable-if-statement, + + # These messages occur when excepting a GError - these should + # be individually marked + bad-exception-context, + catching-non-exception, + + bad-whitespace # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option |