Fix listing line number wrongly using start char pos
Signed-off-by: Yuto Takano <yuto.takano@arm.com>
diff --git a/tests/scripts/check_names.py b/tests/scripts/check_names.py
index a5cbd70..0eba967 100755
--- a/tests/scripts/check_names.py
+++ b/tests/scripts/check_names.py
@@ -144,14 +144,14 @@
if self.quiet:
return (
"{0}:{1}:{2}"
- .format(self.match.filename, self.match.pos[0], self.match.name)
+ .format(self.match.filename, self.match.line_no, self.match.name)
)
return self.textwrapper.fill(
"{0}:{1}: '{2}' does not match the required pattern '{3}'."
.format(
self.match.filename,
- self.match.pos[0],
+ self.match.line_no,
self.match.name,
self.pattern
)
@@ -173,14 +173,14 @@
if self.quiet:
return (
"{0}:{1}:{2}"
- .format(self.match.filename, self.match.pos[0], self.match.name)
+ .format(self.match.filename, self.match.line_no, self.match.name)
)
return self.textwrapper.fill(
"{0}:{1}: '{2}' looks like a typo. It was not found in any "
"macros or any enums. If this is not a typo, put "
"//no-check-names after it."
- .format(self.match.filename, self.match.pos[0], self.match.name)
+ .format(self.match.filename, self.match.line_no, self.match.name)
) + "\n" + str(self.match)
class CodeParser():