Skip to content

Commit 6522bdc

Browse files
committed
Format file and line number so that it is easly to extract from results
Always presenting a matched line number with colon delimiters allows for external tools to process the results output more easily.
1 parent 95d1731 commit 6522bdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/util.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ func renderResults(results []notebook.Result) {
4141
switch vertex := val.Properties["Value"].(type) {
4242
case parser.Note:
4343
if len(result.Context) > 0 {
44-
fmt.Printf("%s:%d - %s\n", vertex.File, result.Line, result.Context)
44+
fmt.Printf("%s:%d: - %s\n", vertex.File, result.Line, result.Context)
4545
} else {
46-
fmt.Printf("%s - %s\n", vertex.File, vertex.Title)
46+
fmt.Printf("%s:%d: - %s\n", vertex.File, vertex.Start, vertex.Title)
4747
}
4848
case string:
4949
fmt.Printf("%s\n", vertex)

0 commit comments

Comments
 (0)