-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic on specific comment #20
Comments
Can you provide a minimal example? I can't reproduce it. This one seems to work fine: package main
import "fmt"
/*r = regexp.MustCompile(
`^\s*(?:[\pL]{3}-[0-9]{2}|[0-9]{2}-[\pL]{3})-[0-9]{2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}\s[\pL]{1,6}\s*$`,
)*/
func main() {
fmt.Println("hello, world")
} golangci-lint run --disable-all --enable godot |
@tetafro Not sure if it's the same issue, but I also got a panic at the exact same line in checks.go (roughly, I'm using the v1.4.8 release of godot). In my case it seems to be the following line: "└─Object/child2", // last objects gets └─ ~/Downloads/godot ./cmd/clusterctl/cmd/describe_cluster_test.go -c ./.godot.yaml
panic: runtime error: slice bounds out of range [:50] with capacity 48
goroutine 1 [running]:
github.com/tetafro/godot.checkCommentForPeriod(0xc000180ad0, 0x1, 0xa1, 0xc00001c760, 0x19, 0x7ffeefbff4e2, 0x2d, 0x13be, 0xae, 0x1c, ...)
/home/runner/work/godot/godot/checks.go:81 +0x498
github.com/tetafro/godot.checkComments(0xc0001880b0, 0x2, 0x2, 0xc0000146b0, 0x3, 0xc0000102c0, 0x4, 0x4, 0x101, 0x124a9a0, ...)
/home/runner/work/godot/godot/checks.go:40 +0x2da
github.com/tetafro/godot.Run(0xc000026780, 0xc000010300, 0xc0000146b0, 0x3, 0xc0000102c0, 0x4, 0x4, 0x101, 0x0, 0x0, ...)
/home/runner/work/godot/godot/godot.go:63 +0x2f0
main.main()
/home/runner/work/godot/godot/cmd/godot/main.go:104 +0xb85 .godot.yaml scope: all
period: true
capital: true |
I think I fixed it. At least it works for cluster-api repo. There was a problem with non-ascii characters. |
Thx! |
This comment:
leads to
The text was updated successfully, but these errors were encountered: