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

Inspection for boolean comparison to Boolean literals #2220

Closed
ThunderFrame opened this issue Sep 6, 2016 · 1 comment
Closed

Inspection for boolean comparison to Boolean literals #2220

ThunderFrame opened this issue Sep 6, 2016 · 1 comment
Labels
duplicate Thanks for the feedback! We're already tracking this report/request at the linked issue. enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-inspections

Comments

@ThunderFrame
Copy link
Member

Comparing True to True just adds operations, and makes the code less readable.

    If Foo = True Then
    'If Foo Then
    End If

    If Foo = False Then
    'If Not Foo Then
    End If

    If Foo = Not True Then
    'If Not Foo Then
    End If

    If Not Foo = False Then
    'If Foo Then
    End If

    If Not Foo = Not True Then
    'If Foo Then
    End If

    While Foo = True
    'While Foo
    Wend

    Do While Foo = False
    'Do While Not Foo
    Loop

    Do
    Loop Until Foo = True
    'Loop Until Foo

    Do
    Loop Until Foo = False
    'Loop Until Not Foo
@ThunderFrame ThunderFrame added enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-inspections labels Sep 6, 2016
@retailcoder
Copy link
Member

This would be a duplicate of #2222

@retailcoder retailcoder added the duplicate Thanks for the feedback! We're already tracking this report/request at the linked issue. label Sep 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Thanks for the feedback! We're already tracking this report/request at the linked issue. enhancement Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope. feature-inspections
Projects
None yet
Development

No branches or pull requests

2 participants