docs: def lint():
      """ Report pylint results.
      """
      from pylint import lint as linter
  
      # report according to file extension
      reporters = {
          ".html": linter.HTMLReporter,
          ".log": linter.ParseableTextReporter,
          ".txt": linter.TextReporter,
      }
  
      lint_build_dir = path("build/lint")
      lint_build_dir.exists() or lint_build_dir.makedirs()
  
      argv = []
      rcfile = options.lint.get("rcfile")
      if not rcfile and path("pylint.cfg").exists():
          rcfile = "pylint.cfg"
      if rcfile:
          argv += ["--rcfile", os.path.abspath(rcfile)]
      if options.lint.get("msg_only", False):
          argv += ["-rn"]
      argv += [
          "--import-graph", (lint_build_dir / "imports.dot").abspath(),
      ]
      argv += toplevel_packages()
  
      sys.stderr.write("Running %s::pylint '%s'\n" % (sys.argv[0], "' '".join(argv)))
      outfile = options.lint.get("output", None)
      if outfile:
          outfile = os.path.abspath(outfile)
  
      try:
          with pushd("src" if path("src").exists() else "."):
              if outfile:
                  reporterClass = reporters.get(path(outfile).ext, linter.TextReporter)
                  sys.stderr.write("Writing output to %r\n" % (str(outfile),))
                  linter.Run(argv, reporter=reporterClass(open(outfile, "w")))
              else:
                  linter.Run(argv)
      except SystemExit, exc:
          if not exc.code:
              sys.stderr.write("paver::lint - No problems found.\n")
          elif exc.code & 32:
              # usage error (internal error in this code)
              sys.stderr.write("paver::lint - Usage error, bad arguments %r?!\n" % (argv,))
              raise
          else:
              bits = {
                  1: "fatal",
                  2: "error",
                  4: "warning",
                  8: "refactor",
                  16: "convention",
              }
              sys.stderr.write("paver::lint - Some %s message(s) issued.\n" % (
                  ", ".join([text for bit, text in bits.items() if exc.code & bit])
              ))
              if exc.code & 3:
                  sys.stderr.write("paver::lint - Exiting due to fatal / error message.\n")
                  raise