Skip to content

SC2157 should also check test #3200

@tgross35

Description

@tgross35
#!/bin/sh

test -z SOMEARG  && echo y || echo n

[ -z SOMEARG ] && echo y || echo n

The [ -z SOMEARG ] line emits SC2157 (error): Argument to -z is always false due to literal strings., as expected. However, the version with test does not get checked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions