-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://github.com/inc2734/snow-monkey/issues/1332
- Loading branch information
Showing
16 changed files
with
17,780 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
# This file is for unifying the coding style for different editors and IDEs | ||
# editorconfig.org | ||
|
||
# WordPress Coding Standards | ||
# https://make.wordpress.org/core/handbook/coding-standards/ | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = tab | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{json, yml}] | ||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.php] | ||
indent_style = tab | ||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
.DS_Store | ||
vendor/ | ||
composer.lock | ||
node_modules/ | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,66 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="WordPress Coding Standards"> | ||
<description>Sniffs for WordPress plugins, with minor modifications</description> | ||
|
||
<rule ref="PHPCompatibility"/> | ||
<config name="testVersion" value="5.6-"/> | ||
|
||
<rule ref="WordPress-Core"> | ||
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found"/> | ||
<exclude name="Generic.Commenting.DocComment.MissingShort"/> | ||
<exclude name="Generic.Commenting.DocComment.ShortNotCapital"/> | ||
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/> | ||
<exclude name="Squiz.Commenting.ClassComment.Missing"/> | ||
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/> | ||
<exclude name="Squiz.Commenting.FileComment.SpacingAfterComment"/> | ||
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/> | ||
</rule> | ||
<rule ref="WordPress-Docs"/> | ||
<rule ref="WordPress.WP.I18n"/> | ||
<config name="text_domain" value="inc2734-wp-seo"/> | ||
<ruleset name="themes"> | ||
<description>Apply WordPress Coding Standards to all files</description> | ||
|
||
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis"> | ||
<properties> | ||
<property name="allowUnusedParametersBeforeUsed" value="true"/> | ||
</properties> | ||
</rule> | ||
<rule ref="WordPress.CodeAnalysis.EmptyStatement"/> | ||
<!-- Only scan PHP files. --> | ||
<arg name="extensions" value="php"/> | ||
|
||
<rule ref="PEAR.Functions.FunctionCallSignature"> | ||
<properties> | ||
<property name="allowMultipleArguments" value="false"/> | ||
</properties> | ||
</rule> | ||
<!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. --> | ||
<arg name="cache"/> | ||
|
||
<!-- Set the memory limit to 256M. | ||
For most standard PHP configurations, this means the memory limit will temporarily be raised. | ||
Ref: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#specifying-phpini-settings | ||
--> | ||
<ini name="memory_limit" value="256M"/> | ||
|
||
<!-- Strip the filepaths down to the relevant bit. --> | ||
<arg name="basepath" value="./"/> | ||
|
||
<!-- Check up to 20 files simultaneously. --> | ||
<arg name="parallel" value="20"/> | ||
|
||
<!-- Show sniff codes in all reports. --> | ||
<arg value="ps"/> | ||
<arg name="extensions" value="php"/> | ||
|
||
<file>.</file> | ||
|
||
<config name="text_domain" value="inc2734-wp-seo"/> | ||
|
||
<rule ref="WordPress-Core"/> | ||
<rule ref="WordPress.CodeAnalysis.EmptyStatement"/> | ||
|
||
<!-- These rules are being set as warnings instead of errors, so we can error check the entire codebase. --> | ||
<rule ref="WordPress.PHP.YodaConditions.NotYoda"> | ||
<type>warning</type> | ||
</rule> | ||
<rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase"> | ||
<type>warning</type> | ||
</rule> | ||
<rule ref="WordPress.DB.PreparedSQL.InterpolatedNotPrepared"> | ||
<type>warning</type> | ||
</rule> | ||
<rule ref="WordPress.DB.PreparedSQL.NotPrepared"> | ||
<type>warning</type> | ||
</rule> | ||
<rule ref="WordPress.Files.FileName.InvalidClassFileName"> | ||
<type>warning</type> | ||
</rule> | ||
|
||
<!-- Directories and third party library exclusions. --> | ||
<exclude-pattern>/vendor/</exclude-pattern> | ||
<exclude-pattern>/node_modules/</exclude-pattern> | ||
<exclude-pattern>/src/dist/</exclude-pattern> | ||
<exclude-pattern>*/tests/*</exclude-pattern> | ||
<exclude-pattern>*/languages/*</exclude-pattern> | ||
<exclude-pattern>*/languages/*</exclude-pattern> | ||
|
||
<!-- Assignments in while conditions are a valid method of looping over iterables. --> | ||
<rule ref="WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition"> | ||
<exclude-pattern>*</exclude-pattern> | ||
</rule> | ||
|
||
<!-- We're not going to rename files. --> | ||
<rule ref="WordPress.Files.FileName"> | ||
<exclude-pattern>*</exclude-pattern> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":1,"defects":{"Inc2734_WP_SEO_Test::sample":5},"times":{"Inc2734_WP_SEO_Test::sample":0.043}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.