linter: Create error printing library.

For performance reasons, we spawn each linter in a separate OS thread.
The downside of this is that all lints would end up in stdout without
much visual separation, resulting in confusing error log. This commit
introduce the `print_err` function, which shows which linter each line
of lint is from.
This commit is contained in:
Tommy Ip
2017-07-06 12:09:45 +08:00
parent c4c3124d34
commit 3b8864bafa
2 changed files with 40 additions and 0 deletions

View File

@@ -25,6 +25,13 @@ FAIL = '\033[91m'
ENDC = '\033[0m'
BLACKONYELLOW = '\x1b[0;30;43m'
WHITEONRED = '\x1b[0;37;41m'
BOLDRED = '\x1B[1;31m'
GREEN = '\x1b[32m'
YELLOW = '\x1b[33m'
BLUE = '\x1b[34m'
MAGENTA = '\x1b[35m'
CYAN = '\x1b[36m'
def get_deployment_version(extract_path):
# type: (str) -> str