feat: phpcs.xml and wp-content/*/.gitkeep
All checks were successful
WordPress deployment / deploy (push) Successful in 4s

This commit is contained in:
2025-08-07 15:22:40 -04:00
parent 7fef10bdcf
commit 1f5f025943
5 changed files with 78 additions and 0 deletions

15
.gitignore vendored
View File

@@ -2,3 +2,18 @@
!/.gitea !/.gitea
!/.gitignore !/.gitignore
!/composer.* !/composer.*
!/phpcs.xml
!/wp-content/
/wp-content/*
# WordPress plugins
!/wp-content/mu-plugins/
!/wp-content/plugins/
/wp-content/plugins/*
!/wp-content/plugins/.gitkeep
# WordPress themes
!/wp-content/themes/
/wp-content/themes/*
!/wp-content/themes/.gitkeep
#!/wp-content/themes/wp-skeleton/

63
phpcs.xml Normal file
View File

@@ -0,0 +1,63 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="WordPress-Websimple" namespace="WordPressCS\WordPress" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>Custom WordPress coding standards by Websimple.</description>
<file>.</file>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<arg name="encoding" value="utf8"/>
<arg name="extensions" value="php"/>
<rule ref="WordPress">
<exclude name="Generic.CodeAnalysis.AssignmentInCondition.Found"/>
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
<exclude name="Generic.PHP.DisallowShortOpenTag.EchoFound"/>
<exclude name="Squiz.Commenting.BlockComment.Empty"/>
<exclude name="Squiz.Commenting.FileComment.Missing"/>
<exclude name="Squiz.Commenting.FileComment.Missing"/>
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag"/>
<exclude name="Squiz.Commenting.FileComment.SpacingAfterComment"/>
<exclude name="Squiz.Commenting.FileComment.WrongStyle"/>
<exclude name="Squiz.Commenting.FunctionComment.Missing"/>
<exclude name="Squiz.Commenting.FunctionComment.WrongStyle"/>
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
<exclude name="Squiz.Commenting.InlineComment.SpacingBefore"/>
<exclude name="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace"/>
<exclude name="Squiz.PHP.CommentedOutCode.Found"/>
<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found"/>
<exclude name="Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure"/>
<exclude name="Squiz.PHP.EmbeddedPhp.ShortOpenEchoNoSemicolon"/>
<exclude name="Squiz.Strings.DoubleQuoteUsage.NotRequired"/>
<exclude name="Universal.Files.SeparateFunctionsFromOO.Mixed"/>
<exclude name="Universal.Operators.DisallowShortTernary.Found"/>
<exclude name="WordPress.DB.DirectDatabaseQuery.DirectQuery"/>
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching"/>
<exclude name="WordPress.DB.PreparedSQL.InterpolatedNotPrepared"/>
<exclude name="WordPress.DB.PreparedSQLPlaceholders.LikeWildcardsInQuery"/>
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_meta_key"/>
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_meta_query"/>
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_meta_value"/>
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_tax_query"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores"/>
<exclude name="WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode"/>
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict"/>
<exclude name="WordPress.PHP.YodaConditions.NotYoda"/>
<exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped"/>
<exclude name="WordPress.Security.NonceVerification.Recommended"/>
<exclude name="WordPress.Security.ValidatedSanitizedInput.InputNotSanitized"/>
<exclude name="WordPress.Security.ValidatedSanitizedInput.InputNotValidated"/>
<exclude name="WordPress.Security.ValidatedSanitizedInput.MissingUnslash"/>
<exclude name="WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents"/>
<exclude name="WordPress.WP.Capabilities.RoleFound"/>
<exclude name="WordPress.WP.DiscouragedFunctions.wp_reset_query_wp_reset_query"/>
<exclude name="WordPress.WP.EnqueuedResources.NonEnqueuedScript"/>
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited"/>
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment"/>
</rule>
<rule ref="Internal.NoCodeFound">
<severity>0</severity>
</rule>
</ruleset>

View File

View File

View File