Skip to content

Commit

Permalink
fix weird error
Browse files Browse the repository at this point in the history
  • Loading branch information
notJoon committed Sep 4, 2024
1 parent 249d403 commit e6b5742
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion formatter/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (b *IssueFormatterBuilder) AddUnderlineAndMessage() *IssueFormatterBuilder
b.result.WriteString(lineStyle.Sprintf("%s| ", padding))

if startLine <= 0 || startLine > len(b.snippet.Lines) || endLine <= 0 || endLine > len(b.snippet.Lines) {
b.result.WriteString(messageStyle.Sprintf("Error: Invalid line numbers\n"))
b.result.WriteString(messageStyle.Sprintf("%s\n\n", b.issue.Message))
return b
}

Expand Down
9 changes: 5 additions & 4 deletions testdata/missing_mod/foo.gno
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package main
package foo

import (
"gno.land/p/demo/avl"
"gno.land/r/demo/users"
"gno.land/p/demo/ufmt"
)

func main() {}
func main() {
ufmt.Println("Hello, World!")
}
6 changes: 1 addition & 5 deletions testdata/missing_mod/gno.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
module test

require (
gno.land/p/demo/avl v0.0.0-latest
)
module foo

0 comments on commit e6b5742

Please sign in to comment.