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

float-values: Fix bug on strings containing fordidden values #496

Merged
merged 1 commit into from Oct 4, 2022

Conversation

adrienverge
Copy link
Owner

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


@DerekTBrown @nyuszika7h for info

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
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 98.932% when pulling d5fe336 on fix/floating-values-regexp into e8391de on master.

@adrienverge adrienverge merged commit 008db4a into master Oct 4, 2022
@adrienverge adrienverge deleted the fix/floating-values-regexp branch October 4, 2022 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive for scientific notation
2 participants