Skip to content

Instantly share code, notes, and snippets.

@akiya64
Last active October 26, 2018 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akiya64/1b7119ca9d9d1682889185edeb11b651 to your computer and use it in GitHub Desktop.
Save akiya64/1b7119ca9d9d1682889185edeb11b651 to your computer and use it in GitHub Desktop.
Is it disable `is_theme` ? PhpCodeSniffer for WordPress coding Standard
/*
* Generic check for lowercase hyphenated file names.
*/
if ( $fileName !== $expected && ( false === $this->is_theme || 1 !== preg_match( self::THEME_EXCEPTIONS_REGEX, $fileName ) ) ) {
$this->phpcsFile->addError(
'Filenames should be all lowercase with hyphens as word separators. Expected %s, but found %s.',
0,
'NotHyphenatedLowercase',
array( $expected, $fileName )
);
}
unset( $expected );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment