Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative excludes to allow overriding excludes #33

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ in reverse chronological order by release.

## Unreleased

## 1.3.0 - 2024-06-26

### Changed

- Changed plugins and mu-plugins exclude-patterns to relative so that they can be overridden for certain directories using <file> config.
- Exclude languages folder.
- Update packages.

## 1.2.5 - 2024-01-19

### Fixed
Expand Down
13 changes: 10 additions & 3 deletions Geniem/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@
<exclude-pattern>*/.git/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>

<!-- Don't check Plugins, we might not have option (or resources) to fix them -->
<exclude-pattern>*/mu-plugins/*</exclude-pattern>
<exclude-pattern>*/plugins/*</exclude-pattern>
<!--
Don't check Plugins, we might not have option (or resources) to fix them.
These paths are specified as relative so that we can include certain files or directories
within these directories using <file>foo/bar</file>.
-->
<exclude-pattern type="relative">*/mu-plugins/*</exclude-pattern>
<exclude-pattern type="relative">*/plugins/*</exclude-pattern>

<!-- Don't check languages -->
<exclude-pattern type="relative">*/languages/*</exclude-pattern>

<!-- db-error.php and object-cache.php, not ours. -->
<exclude-pattern>*/db-error.php</exclude-pattern>
Expand Down
34 changes: 17 additions & 17 deletions USED_RULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Generic (45 sniffs)
Generic.WhiteSpace.ScopeIndent

Geniem (1 sniff)
-----------------
----------------
Geniem.ControlStructures.ElseCatchNewline

PEAR (4 sniffs)
Expand Down Expand Up @@ -139,21 +139,21 @@ PHPCompatibility (117 sniffs)
PHPCompatibility.ParameterValues.ForbiddenStripTagsSelfClosingXHTML
PHPCompatibility.ParameterValues.NewArrayReduceInitialType
PHPCompatibility.ParameterValues.NewFopenModes
PHPCompatibility.ParameterValues.NewHTMLEntitiesEncodingDefault
PHPCompatibility.ParameterValues.NewHashAlgorithms
PHPCompatibility.ParameterValues.NewIDNVariantDefault
PHPCompatibility.ParameterValues.NewHTMLEntitiesEncodingDefault
PHPCompatibility.ParameterValues.NewIconvMbstringCharsetDefault
PHPCompatibility.ParameterValues.NewIDNVariantDefault
PHPCompatibility.ParameterValues.NewNegativeStringOffset
PHPCompatibility.ParameterValues.NewPCREModifiers
PHPCompatibility.ParameterValues.NewPackFormat
PHPCompatibility.ParameterValues.NewPasswordAlgoConstantValues
PHPCompatibility.ParameterValues.NewPCREModifiers
PHPCompatibility.ParameterValues.NewProcOpenCmdArray
PHPCompatibility.ParameterValues.NewStripTagsAllowableTagsArray
PHPCompatibility.ParameterValues.RemovedHashAlgorithms
PHPCompatibility.ParameterValues.RemovedIconvEncoding
PHPCompatibility.ParameterValues.RemovedImplodeFlexibleParamOrder
PHPCompatibility.ParameterValues.RemovedMbStrrposEncodingThirdParam
PHPCompatibility.ParameterValues.RemovedMbstringModifiers
PHPCompatibility.ParameterValues.RemovedMbStrrposEncodingThirdParam
PHPCompatibility.ParameterValues.RemovedNonCryptoHash
PHPCompatibility.ParameterValues.RemovedPCREModifiers
PHPCompatibility.ParameterValues.RemovedSetlocaleString
Expand All @@ -180,10 +180,6 @@ PHPCompatibility (117 sniffs)
PHPCompatibility.Variables.NewUniformVariableSyntax
PHPCompatibility.Variables.RemovedPredefinedGlobalVariables

PSR12 (1 sniff)
----------------
PSR12.Keywords.ShortFormTypeKeywords

PSR2 (7 sniffs)
---------------
PSR2.Classes.PropertyDeclaration
Expand All @@ -194,6 +190,10 @@ PSR2 (7 sniffs)
PSR2.Methods.MethodDeclaration
PSR2.Namespaces.NamespaceDeclaration

PSR12 (1 sniff)
---------------
PSR12.Keywords.ShortFormTypeKeywords

Squiz (29 sniffs)
-----------------
Squiz.Classes.SelfMemberReference
Expand Down Expand Up @@ -237,14 +237,14 @@ WordPress (58 sniffs)
WordPress.CodeAnalysis.AssignmentInCondition
WordPress.CodeAnalysis.EmptyStatement
WordPress.CodeAnalysis.EscapedNotTranslated
WordPress.DateTime.CurrentTimeTimestamp
WordPress.DateTime.RestrictedFunctions
WordPress.DB.DirectDatabaseQuery
WordPress.DB.PreparedSQL
WordPress.DB.PreparedSQLPlaceholders
WordPress.DB.RestrictedClasses
WordPress.DB.RestrictedFunctions
WordPress.DB.SlowDBQuery
WordPress.DateTime.CurrentTimeTimestamp
WordPress.DateTime.RestrictedFunctions
WordPress.NamingConventions.PrefixAllGlobals
WordPress.NamingConventions.ValidFunctionName
WordPress.NamingConventions.ValidHookName
Expand All @@ -266,13 +266,18 @@ WordPress (58 sniffs)
WordPress.Security.SafeRedirect
WordPress.Security.ValidatedSanitizedInput
WordPress.Utils.I18nTextDomainFixer
WordPress.WhiteSpace.CastStructureSpacing
WordPress.WhiteSpace.ControlStructureSpacing
WordPress.WhiteSpace.DisallowInlineTabs
WordPress.WhiteSpace.OperatorSpacing
WordPress.WhiteSpace.PrecisionAlignment
WordPress.WP.AlternativeFunctions
WordPress.WP.CapitalPDangit
WordPress.WP.CronInterval
WordPress.WP.DeprecatedClasses
WordPress.WP.DeprecatedFunctions
WordPress.WP.DeprecatedParameterValues
WordPress.WP.DeprecatedParameters
WordPress.WP.DeprecatedParameterValues
WordPress.WP.DiscouragedConstants
WordPress.WP.DiscouragedFunctions
WordPress.WP.EnqueuedResourceParameters
Expand All @@ -281,8 +286,3 @@ WordPress (58 sniffs)
WordPress.WP.I18n
WordPress.WP.PostsPerPage
WordPress.WP.TimezoneChange
WordPress.WhiteSpace.CastStructureSpacing
WordPress.WhiteSpace.ControlStructureSpacing
WordPress.WhiteSpace.DisallowInlineTabs
WordPress.WhiteSpace.OperatorSpacing
WordPress.WhiteSpace.PrecisionAlignment
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"dealerdirect/phpcodesniffer-composer-installer": true,
"composer/installers": true,
"composer/package-versions-deprecated": true,
"ergebnis/composer-normalize": true
"ergebnis/composer-normalize": true,
"php-http/discovery": true
}
},
"scripts": {
Expand Down
Loading
Loading