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

Report InvalidRange for empty until range #2074

Merged
merged 1 commit into from
Nov 5, 2019
Merged

Report InvalidRange for empty until range #2074

merged 1 commit into from
Nov 5, 2019

Conversation

schalkms
Copy link
Member

@schalkms schalkms commented Nov 4, 2019

This commit handles the case where both given values in the until
function are equal. Closes #2044

Docs for Int.until(to: Int): IntRange:
If the [to] value is less than or equal to this value,
then the returned range is empty.

This commit handles the case where both given values in the until
function are equal. Closes #2044

Docs for Int.until(to: Int): IntRange:
If the [to] value is less than or equal to this value,
then the returned range is empty.
@arturbosch arturbosch added this to the 1.2.0 milestone Nov 5, 2019
@arturbosch arturbosch merged commit 3590c9b into detekt:master Nov 5, 2019
@schalkms schalkms deleted the fix-#2044-InvalidRange branch November 8, 2019 18:13
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
This commit handles the case where both given values in the until
function are equal. Closes detekt#2044

Docs for Int.until(to: Int): IntRange:
If the [to] value is less than or equal to this value,
then the returned range is empty.
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
This commit handles the case where both given values in the until
function are equal. Closes detekt#2044

Docs for Int.until(to: Int): IntRange:
If the [to] value is less than or equal to this value,
then the returned range is empty.
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.

potential-bugs InvalidRange does not work in all cases
2 participants