Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Vale reports panic: strings: negative Repeat count error #696

@aireilly

Description

@aireilly

Check for existing issues

  • Completed

Environment

$ vale -v
vale version 2.29.2

Describe the bug / provide steps to reproduce it

$ vale . --minAlertLevel=warning --output=line

I get the following error:

panic: strings: negative Repeat count

goroutine 154 [running]:
strings.Repeat({0xe4e1a0?, 0x4?}, 0xd01fc7?)
	/opt/hostedtoolcache/go/1.20.8/x64/src/strings/strings.go:538 +0x44b
github.com/errata-ai/vale/v2/internal/lint.(*Linter).lintADoc.func2({0xc00a10261c?, 0x7f338d479a00?})
	/home/runner/work/vale/vale/internal/lint/adoc.go:135 +0x55
github.com/jdkato/regexp.(*Regexp).ReplaceAllStringFunc.func1({0xc008de5760, 0x1c, 0x20}, {0xc009882a10?, 0x0?, 0x0?})
	/home/runner/go/pkg/mod/github.com/jdkato/[email protected]/regexp.go:362 +0x91
github.com/jdkato/regexp.(*Regexp).replaceAll(0xc0001cac40, {0x0, 0x0, 0x0}, {0xc00a102600, 0x2581}, 0x547a8e?, 0xc003393be0)
	/home/runner/go/pkg/mod/github.com/jdkato/[email protected]/regexp.go:399 +0x385
github.com/jdkato/regexp.(*Regexp).ReplaceAllStringFunc(0xc002856000?, {0xc00a102600?, 0x2581?}, 0xc0040362a0?)
	/home/runner/go/pkg/mod/github.com/jdkato/[email protected]/regexp.go:361 +0x5d
github.com/errata-ai/vale/v2/internal/lint.(*Linter).lintADoc(0xc0037340a0, 0xc002856000)
	/home/runner/work/vale/vale/internal/lint/adoc.go:126 +0x2a5
github.com/errata-ai/vale/v2/internal/lint.(*Linter).lintFile(0xc0037340a0, {0xc0020a1380?, 0xc000566701?})
	/home/runner/work/vale/vale/internal/lint/lint.go:179 +0x405
github.com/errata-ai/vale/v2/internal/lint.(*Linter).lintFiles.func1.1.1({0xc0020a1380?, 0x0?})
	/home/runner/work/vale/vale/internal/lint/lint.go:125 +0x5b
created by github.com/errata-ai/vale/v2/internal/lint.(*Linter).lintFiles.func1.1
	/home/runner/work/vale/vale/internal/lint/lint.go:123 +0x20c

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions