PHP_CodeSniffer icon indicating copy to clipboard operation
PHP_CodeSniffer copied to clipboard

LanguageConstructSpacingSniff changes spaces to ·· (utf-8 middot)

Open Mrten opened this issue 5 years ago • 9 comments

The LanguageConstructSpacingSniff from the Squiz standard outputs the whitespace it conflicts via an extra step:

    $data  = [Util\Common::prepareForOutput($content)];

which adds some terminal specific ANSI escape sequences

    $content = str_replace(' ', "\033[30;1m·\033[0m", $content);

This makes my subversion pre-commit hook error out with

Committing transaction...
svn: E165001: Commit failed (details follow):
svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output:
[Error output could not be translated from the native locale to UTF-8.]

which is kinda hard to debug :(

Mrten avatar Oct 16 '19 11:10 Mrten