Skip to content

The "phpcs" doesn't use error exit code when invalid standard is given #2412

@aik099

Description

@aik099

I was trying to use PHP_CodeSniffer 2.x standard on PHP_CodeSniffer 3.x binary. Since ruleset.xml format wasn't changed I wasn't getting any exception due wrongly named sniff classes.

I however did get this output:

ERROR: Referenced sniff "Squiz.PHP.DisallowObEndFlush" does not exist

Run "phpcs --help" for usage information

Unfortunately exit code from that operation was 0 (= success) and therefore any build system using PHP_CodeSniffer wouldn't fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions