Skip to content
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

Parse floats correctly and fix mistake from go-yaml/yaml#171 #483

Merged
merged 2 commits into from
Sep 9, 2021

Conversation

pivotaljohn
Copy link
Contributor

The regular expression is copy & pasted form the one in the spec.
The change suggested in go-yaml/yaml#171 and integrated was improper.

Closes go-yaml/yaml#290

(cherry-pick of go-yaml/yaml@7b8349a)

Signed-off-by: John Ryan jtigger@infosysengr.com

The regular expression is copy & pasted form the one in the spec.
The change suggested in go-yaml/yaml#171 and integrated was improper.

Closes go-yaml/yaml#290

(cherry-pick of go-yaml/yaml@7b8349a)

Signed-off-by: John Ryan <jtigger@infosysengr.com>
@cppforlife
Copy link
Contributor

@jtigger lets add a test in yamlmeta/parser_test.go to avoid accidentally regressing on this bug.

@cppforlife cppforlife merged commit dafff19 into develop Sep 9, 2021
pivotaljohn pushed a commit that referenced this pull request Oct 7, 2021
- this file was recently updated in a bug fix on parsing float values.
  as a result what _was_ a string is now a float literal (see #483)
- `go fmt` uses lowercase 'e' for the exponent notation
- various tooling applies `go fmt` to our code while building and releasing.
- we've updated our build and test scripts to skip this package (see
  prior commits).
- Go Releaser is also `go fmt`'ing our files just prior to release.

Signed-off-by: John Ryan <jtigger@infosysengr.com>
pivotaljohn pushed a commit that referenced this pull request Oct 7, 2021
- this file was recently updated in a bug fix on parsing float values.
  as a result what _was_ a string is now a float literal (see #483)
- `go fmt` uses lowercase 'e' for the exponent notation
- various tooling applies `go fmt` to our code while building and releasing.
- we've updated our build and test scripts to skip this package (see
  prior commits).
- Go Releaser is also `go fmt`'ing our files just prior to release.

Signed-off-by: John Ryan <jtigger@infosysengr.com>
@pivotaljohn pivotaljohn deleted the fix-floats branch November 3, 2021 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Float parsing is unnecessarily restrictive
5 participants