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
False positive for scientific notation #495
Comments
Hello @nyuszika7h, thanks for the report! I can confirm the bug, and it actually occurs on all options of the - .1two3
- 1e2a
- .NaNa
- .Infinit∞
I guess the writing of tests wasn't thorough enough on #465. I'll work on a fix. |
adrienverge
added a commit
that referenced
this issue
Oct 2, 2022
The rule correctly reports number values like `.1`, `1e2`, `.NaN` and `.Inf`, but it also reported false positives on strings like `.1two3`, `1e2a`, `.NaNa` and `.Infinit∞`. The regexps need to end with an end delimiter (`$`) otherwise longer strings can be matched too. Fixes #495
adrienverge
added a commit
that referenced
this issue
Oct 4, 2022
The rule correctly reports number values like `.1`, `1e2`, `.NaN` and `.Inf`, but it also reported false positives on strings like `.1two3`, `1e2a`, `.NaNa` and `.Infinit∞`. The regexps need to end with an end delimiter (`$`) otherwise longer strings can be matched too. Fixes #495
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given the following YAML file:
Running
yamllint -d 'rules: {float-values: {forbid-scientific-notation: true}}' test.yaml
produces this error:This is incorrect, as it's actually parsed as a string:
The text was updated successfully, but these errors were encountered: