Skip to content

annoying newline after an empty diff #1781

@hujuice

Description

@hujuice

This is a very minor bug, but annoying for me.
If I run
phpcs --report=diff
in absence of errors and warnings, a newline is printed.

So, for example, my pre-commit git hook results malformed

echo -n 'PHP CodeSniffer... '
if vendor/bin/phpcs -s --report=diff $i; then
    echo 'ok'
else
    echo 'failed'
    exit 1
fi

Yes, it's really minor, but grrrr >:-(

Regards (and thanks),
HUjuice

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions