tools: Always show problems with problem status.

- Some tools are strict and produce many issues. Previously
  their problems were ignored, and given normal status.
- Which tools produce too many issues is not obvious, better
  to be consistent and show problems for all.
This commit is contained in:
Andrew Hamilton 2018-07-05 14:26:52 +10:00
parent d40e0a8b59
commit 3a62a2a0d7
3 changed files with 3 additions and 5 deletions

View file

@ -334,7 +334,7 @@ def pydoc(path):
@deps(deps={"mypy"}, url="mypy", executables={"mypy"})
def mypy(path):
stdout, stderr, returncode = _do_command(["mypy", path], timeout=TIMEOUT)
status = Status.ok if returncode == 0 else Status.normal
status = Status.ok if returncode == 0 else Status.problem
return status, fill3.Text(stdout)
@ -458,7 +458,7 @@ def bandit(path):
stdout, stderr, returncode = _do_command(
[python_version, "-m", "bandit.cli.main", "-f", "txt", path],
timeout=TIMEOUT)
status = Status.ok if returncode == 0 else Status.normal
status = Status.ok if returncode == 0 else Status.problem
text_without_timestamp = "".join(stdout.splitlines(keepends=True)[2:])
return status, fill3.Text(text_without_timestamp)