Skip to content

False positive for unreachable_code_linter() on inline expressions #2259

Description

@MichaelChirico
lint("function(x) if (x > 2) stop() else x\n", unreachable_code_linter())
# <text>:1:31: warning: [unreachable_code_linter] Code and comments coming after a return() or stop() should be removed.
# function(x) if (x > 2) stop() else x
#                               ^~~~

This may be a regression; cc @MEO265.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    false-positivecode that shouldn't lint, but does

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions