mirror of https://github.com/zulip/zulip.git
tools: Remove unused `bright_red_output` context manager.
This context manager is no longer in use since the linter visual updates.
This commit is contained in:
parent
2dc35e6c11
commit
61e24cfbea
18
tools/lint
18
tools/lint
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
from contextlib import contextmanager
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
@ -17,18 +16,6 @@ sanity_check.check_venv(__file__)
|
|||
import lister
|
||||
from typing import cast, Callable, Dict, Iterator, List
|
||||
|
||||
@contextmanager
|
||||
def bright_red_output():
|
||||
# type: () -> Iterator[None]
|
||||
# Make the lint output bright red
|
||||
sys.stdout.write('\x1B[1;31m')
|
||||
sys.stdout.flush()
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
# Restore normal terminal colors
|
||||
sys.stdout.write('\x1B[0m')
|
||||
|
||||
|
||||
def run_parallel(lint_functions):
|
||||
# type: (Dict[str, Callable[[], int]]) -> bool
|
||||
|
@ -155,7 +142,6 @@ def run():
|
|||
|
||||
lint_functions[name] = run_linter
|
||||
|
||||
with bright_red_output():
|
||||
external_linter('add_class', ['tools/find-add-class'])
|
||||
external_linter('css', ['tools/check-css'], ['css'])
|
||||
external_linter('eslint', ['node', 'node_modules/.bin/eslint', '--quiet'], ['js'])
|
||||
|
@ -167,8 +153,8 @@ def run():
|
|||
external_linter('swagger', ['node', 'tools/check-swagger'], ['yaml'])
|
||||
|
||||
# gitlint disabled until we can stabilize it more
|
||||
# if not options.no_gitlint:
|
||||
# external_linter('commit_messages', ['tools/commit-message-lint'])
|
||||
# if not options.no_gitlint:
|
||||
# external_linter('commit_messages', ['tools/commit-message-lint'])
|
||||
|
||||
@lint
|
||||
def custom_py():
|
||||
|
|
Loading…
Reference in New Issue