aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/subsystem
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2024-04-03 11:58:00 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-04-03 11:17:36 +0000
commiteca13509503864c93d589d0a5ee59548ff8280be (patch)
tree2ee993a97dd99bba4653278e5e0736585010ac20 /pkg/subsystem
parent9d2a90af8850a414d2da20b806d7aa8fd9a297ae (diff)
pkg/subsystem: display correct lines for parsing errors
We used to ignore the skipped lines.
Diffstat (limited to 'pkg/subsystem')
-rw-r--r--pkg/subsystem/linux/maintainers.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/subsystem/linux/maintainers.go b/pkg/subsystem/linux/maintainers.go
index 90ca79bef..76b2232a6 100644
--- a/pkg/subsystem/linux/maintainers.go
+++ b/pkg/subsystem/linux/maintainers.go
@@ -30,7 +30,9 @@ type maintainersRecord struct {
func parseLinuxMaintainers(content io.Reader) ([]*maintainersRecord, error) {
scanner := bufio.NewScanner(content)
// First skip the headers.
+ var skippedLines int
for scanner.Scan() {
+ skippedLines++
line := scanner.Text()
if line == "Maintainers List" {
// Also skip ------.
@@ -38,7 +40,7 @@ func parseLinuxMaintainers(content io.Reader) ([]*maintainersRecord, error) {
break
}
}
- ml := &maintainersLexer{scanner: scanner}
+ ml := &maintainersLexer{scanner: scanner, currentLine: skippedLines + 1}
ret := []*maintainersRecord{}
loop:
for {