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:
parent
d40e0a8b59
commit
3a62a2a0d7
3 changed files with 3 additions and 5 deletions
|
|
@ -104,7 +104,7 @@ class ToolsTestCase(unittest.TestCase):
|
||||||
|
|
||||||
def test_mypy(self):
|
def test_mypy(self):
|
||||||
self._test_tool(tools.mypy, [("hi3.py", tools.Status.ok),
|
self._test_tool(tools.mypy, [("hi3.py", tools.Status.ok),
|
||||||
("hi.py", tools.Status.normal)])
|
("hi.py", tools.Status.problem)])
|
||||||
|
|
||||||
def test_python_coverage(self):
|
def test_python_coverage(self):
|
||||||
self._test_tool(tools.python_coverage, self.HI_NORMAL)
|
self._test_tool(tools.python_coverage, self.HI_NORMAL)
|
||||||
|
|
|
||||||
|
|
@ -334,7 +334,7 @@ def pydoc(path):
|
||||||
@deps(deps={"mypy"}, url="mypy", executables={"mypy"})
|
@deps(deps={"mypy"}, url="mypy", executables={"mypy"})
|
||||||
def mypy(path):
|
def mypy(path):
|
||||||
stdout, stderr, returncode = _do_command(["mypy", path], timeout=TIMEOUT)
|
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)
|
return status, fill3.Text(stdout)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -458,7 +458,7 @@ def bandit(path):
|
||||||
stdout, stderr, returncode = _do_command(
|
stdout, stderr, returncode = _do_command(
|
||||||
[python_version, "-m", "bandit.cli.main", "-f", "txt", path],
|
[python_version, "-m", "bandit.cli.main", "-f", "txt", path],
|
||||||
timeout=TIMEOUT)
|
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:])
|
text_without_timestamp = "".join(stdout.splitlines(keepends=True)[2:])
|
||||||
return status, fill3.Text(text_without_timestamp)
|
return status, fill3.Text(text_without_timestamp)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -227,13 +227,11 @@ tools_for_extensions = [
|
||||||
dependencies = ["golang-go"]
|
dependencies = ["golang-go"]
|
||||||
url = "golang-go"
|
url = "golang-go"
|
||||||
command = "go vet"
|
command = "go vet"
|
||||||
error_status = "normal"
|
|
||||||
|
|
||||||
[golint]
|
[golint]
|
||||||
dependencies = ["golint"]
|
dependencies = ["golint"]
|
||||||
url = "golint"
|
url = "golint"
|
||||||
command = "golint -set_exit_status"
|
command = "golint -set_exit_status"
|
||||||
error_status = "normal"
|
|
||||||
|
|
||||||
[yamllint]
|
[yamllint]
|
||||||
dependencies = ["yamllint"]
|
dependencies = ["yamllint"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue