diff --git a/travis/lint.py b/travis/lint.py index e1db140c2..05aa28950 100755 --- a/travis/lint.py +++ b/travis/lint.py @@ -128,21 +128,17 @@ def main(): lines[i] = line.decode('utf-8') except UnicodeDecodeError: msg_params = (rel_path, i + 1, 'Invalid UTF-8 (other errors will be ignored)') + error('%s:%i: %s' % msg_params) if is_github_actions: - error() print('::error file=%s,line=%i::%s' % msg_params) - else: - error('%s:%i: %s' % msg_params) lines[i] = '' for linter in linters: try: linter.check(lines) except LinterError as e: + error('%s: %s' % (rel_path, e)) if is_github_actions: - error() print(e.github_actions_workflow_command(rel_path)) - else: - error('%s: %s' % (rel_path, e)) if fix: linter.fix(lines) contents = '\n'.join(lines) diff --git a/travis/script-syntax.py b/travis/script-syntax.py index 53891f762..593a25a24 100755 --- a/travis/script-syntax.py +++ b/travis/script-syntax.py @@ -11,6 +11,7 @@ def print_stderr(stderr, args): return for line in stderr.split('\n'): + print(line) parts = list(map(str.strip, line.split(':'))) # e.g. luac prints "luac:" in front of messages, so find the first part # containing the actual filename @@ -18,7 +19,6 @@ def print_stderr(stderr, args): if parts[i].endswith('.' + args.ext) and parts[i + 1].isdigit(): print('::error file=%s,line=%s::%s' % (parts[i], parts[i + 1], ':'.join(parts[i + 2:]))) break - print(line) def main(args):