We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Repro steps:
$ brew install go-jsonnet ==> Downloading https://ghcr.io/v2/homebrew/core/go-jsonnet/manifests/0.18.0 ... $ echo "{a : '^/v1/abc-[\w-.]+/xyz/[\w-.]+$'}" > a.jsonnet $ jsonnetfmt a.jsonnet panic: Badly formatted string, should have been caught in lexer. goroutine 1 [running]: github.com/google/go-jsonnet/internal/formatter.(*EnforceStringStyle).LiteralString(0x140000f8090, {0x1045014b0, 0x140000f8090}, 0x140000ec210, {0x0, 0x0}) /private/tmp/go-jsonnet-20211221-89224-l130j1/go-jsonnet-0.18.0/internal/formatter/enforce_string_style.go:45 +0x1c8 github.com/google/go-jsonnet/internal/pass.(*Base).Visit(0x140000f8090, {0x1045014b0, 0x140000f8090}, 0x140000fc170, {0x0, 0x0}) /private/tmp/go-jsonnet-20211221-89224-l130j1/go-jsonnet-0.18.0/internal/pass/pass.go:433 +0x294 github.com/google/go-jsonnet/internal/pass.(*Base).ObjectField(0x140000f8090, {0x1045014b0, 0x140000f8090}, 0x140000fc0f0, {0x0, 0x0}) /private/tmp/go-jsonnet-20211221-89224-l130j1/go-jsonnet-0.18.0/internal/pass/pass.go:162 +0x10c github.com/google/go-jsonnet/internal/pass.(*Base).ObjectFields(0x140000f8090, {0x1045014b0, 0x140000f8090}, 0x140000ec330, {0x0, 0x0}) /private/tmp/go-jsonnet-20211221-89224-l130j1/go-jsonnet-0.18.0/internal/pass/pass.go:193 +0x6c github.com/google/go-jsonnet/internal/pass.(*Base).Object(0x140000f8090, {0x1045014b0, 0x140000f8090}, 0x140000ec2c0, {0x0, 0x0}) /private/tmp/go-jsonnet-20211221-89224-l130j1/go-jsonnet-0.18.0/internal/pass/pass.go:333 +0x58 github.com/google/go-jsonnet/internal/pass.(*Base).Visit(0x140000f8090, {0x1045014b0, 0x140000f8090}, 0x1400008e710, {0x0, 0x0}) /private/tmp/go-jsonnet-20211221-89224-l130j1/go-jsonnet-0.18.0/internal/pass/pass.go:437 +0x824 github.com/google/go-jsonnet/internal/pass.(*Base).File(0x140000f8090, {0x1045014b0, 0x140000f8090}, 0x1400008e710, 0x1400009c138) /private/tmp/go-jsonnet-20211221-89224-l130j1/go-jsonnet-0.18.0/internal/pass/pass.go:463 +0x74 github.com/google/go-jsonnet/internal/formatter.visitFile(...) /private/tmp/go-jsonnet-20211221-89224-l130j1/go-jsonnet-0.18.0/internal/formatter/jsonnetfmt.go:144 github.com/google/go-jsonnet/internal/formatter.Format({0x16baff883, 0x9}, {0x140000f8000, 0x26}, {0x2, 0x2, 0x1, 0x1, 0x1, 0x0, ...}) /private/tmp/go-jsonnet-20211221-89224-l130j1/go-jsonnet-0.18.0/internal/formatter/jsonnetfmt.go:183 +0x4ac main.main() /private/tmp/go-jsonnet-20211221-89224-l130j1/go-jsonnet-0.18.0/cmd/jsonnetfmt/cmd.go:289 +0x64c
Originally found via splunk/qbec#284
Caused by the \w in the string value
\w
The text was updated successfully, but these errors were encountered:
The suggested fix in the PR for #551 also fixes this issue.
Sorry, something went wrong.
No branches or pull requests
Repro steps:
Originally found via splunk/qbec#284
Caused by the
\w
in the string valueThe text was updated successfully, but these errors were encountered: