Skip to content

Sniffing from STDIN shows Generic.Files.LowercasedFilename.NotFound error #711

@skyrpex

Description

@skyrpex

Atom's PHPCS linter plugin uses now STDIN to lint on the fly. Someone that uses the Wordpress-VIP ruleset is getting this error Generic.Files.LowercasedFilename.NotFound.

The output of this command cat "path/myfile.php" | phpcs --report=json --standard=WordPress-VIP is:

{
    "totals": {
        "errors": 1,
        "warnings": 0,
        "fixable": 0
    },
    "files": {
        "STDIN": {
            "errors": 1,
            "warnings": 0,
            "messages": [
                {
                    "message": "Filename \"STDIN\" doesn't match the expected filename \"stdin\"",
                    "source": "Generic.Files.LowercasedFilename.NotFound",
                    "severity": 5,
                    "type": "ERROR",
                    "line": 1,
                    "column": 1,
                    "fixable": false
                }
            ]
        }
    }
}

You'll notice that STDIN is treated the filename... See AtomLinter/linter-phpcs#60

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions