Skip to content

Commit 6a6ebd8

Browse files
authored
O2 linter: Fix position of per file messages (#10996)
1 parent f712ed3 commit 6a6ebd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Scripts/o2_linter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def get_tolerated_tests(path: str) -> "list[str]":
208208
if path_tests.is_file():
209209
with path_tests.open() as content:
210210
tests = [line.strip() for line in content.readlines() if line.strip()]
211-
print(f"{path}:0: info: Tolerating tests from {path_tests}. {tests}")
211+
print(f"{path}:1: info: Tolerating tests from {path_tests}. {tests}")
212212
break
213213
return tests
214214

@@ -249,7 +249,7 @@ def is_disabled(self, line: str, prefix_comment="//") -> bool:
249249
def print_error(self, path: str, line: Union[int, None], message: str):
250250
"""Format and print error message."""
251251
# return # Use to suppress error messages.
252-
line = line or 0
252+
line = line or 1
253253
# terminal format
254254
print(f"{path}:{line}: {message_levels[self.severity_current]}: {message} [{self.name}]")
255255
if github_mode and not self.tolerated: # Annotate only not tolerated issues.

0 commit comments

Comments
 (0)