this-pylint 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/usr/bin/env bash
  2. set -eu
  3. #et -o pipefail
  4. output=$(set -eu; /usr/local/cpython-2.7/bin/pylint \
  5. '--init-hook'='import sys; sys.path.append("/home/dstromberg/lib"); sys.path.append(".")' \
  6. '--max-line-length'=133 \
  7. '--indent-string'="\\t" \
  8. '--module-rgx'='[A-Za-z_][-a-zA-Z0-9_]+$' \
  9. '--class-rgx'='[A-Za-z_][-a-zA-Z0-9_]+$' \
  10. "$@" 2>&1 || true)
  11. if echo "$output" | egrep -i traceback > /dev/null
  12. then
  13. echo "pylint exited with a traceback:" 1>&2
  14. echo "$output" 1>&2
  15. exit 1
  16. fi
  17. pruned_output=$(echo "$output" | egrep '^\*\*\*|^[CWERF]:' || true)
  18. if echo "$pruned_output" | egrep -v '^\*\*\*|^W: *[0-9]*: FIXME:' | egrep . > /dev/null
  19. then
  20. echo "$pruned_output" 1>&2
  21. exit 1
  22. else
  23. exit 0
  24. fi
  25. # ************* Module drs_buffer_mod
  26. # C: 7:unpack_slice: Missing docstring
  27. # /usr/local/lib/python2.6/dist-packages/pylint-0.21.3-py2.6.egg/pylint/checkers/variables.py:308: DeprecationWarning: enumerate exists in builtins since py2.3
  28. # for i, stmt in enumerate(astmts[1:]):
  29. # C: 25:DRS_buffer: Missing docstring
  30. # /usr/local/lib/python2.6/dist-packages/logilab_astng-0.20.3-py2.6.egg/logilab/astng/scoped_nodes.py:904: DeprecationWarning: chain exists in itertools since py2.3
  31. # for astng in chain(iter((self,)), self.ancestors()):
  32. # E: 40:DRS_buffer.__getitem__: Undefined variable 'exceptions'
  33. # E: 55:DRS_buffer.__delitem__: Undefined variable 'exceptions'
  34. # C: 57:DRS_buffer.extend: Missing docstring
  35. # E: 64:DRS_buffer.extend: Undefined variable 'exceptions'
  36. # R: 25:DRS_buffer: Too few public methods (1/2)
  37. # ************* Module test-drs_buffer_mod
  38. # E: 15: expected an indented block