Skip to content

--stdin-path with not existed path will ignore code checking #1488

Closed
@withwind8

Description

@withwind8

I'm using PHPCS to process data from STDIN.

When using --stdin-path to specify a existed path, everything is OK.
cat tmp.php | phpcs --stdin-path=existed/path/to/php

However, when a non-existent path is specified,phpcs will ignore the content from STDIN.
cat tmp.php | phpcs --stdin-path=not/existed/path/to/php

My requirement is to check the code that does not have real files.

In my opinion, it is not necessary to check the existence of stdin-path when processing data from STDIN. If you want, just specify the file instead of using STDIN.

I will submit a PR for it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions