This bug was already mentioned in http://pear.php.net/bugs/bug.php?id=20369 but wasn't completely fixed. I don't completely understand all the internals, but I could break it down to https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/File.php#L547 where the `DIRECTOR_SEPARATOR` replacement (and the other "convenient" replacements like `\` => `\\`) , which is performed for global exclusions in https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer.php#L1566, is still missing.