Skip to content

Commit

Permalink
Group the exceptions under a todo
Browse files Browse the repository at this point in the history
  • Loading branch information
ingeniumed committed Jun 26, 2024
1 parent a365a12 commit 0c6d169
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,28 @@
<!-- Do not enforce 'class-' prefix -->
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />

<!-- These are for legacy reasons, as EditFlow's main file cannot be altered -->
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="Universal.Files.SeparateFunctionsFromOO.Mixed" />
<exclude name="PEAR.NamingConventions.ValidClassName.StartWithCapital" />
<exclude name="PEAR.NamingConventions.ValidClassName.Invalid" />

<!-- Allow short ternaries -->
<exclude name="WordPress.PHP.DisallowShortTernary.Found" />

<!-- Allow not returning after the setup theme filter for now -->
<exclude name="WordPressVIPMinimum.Hooks.AlwaysReturnInFilter.MissingReturnStatement" />

<!-- Generates too many false positives -->
<exclude name="WordPress.WP.CapitalPDangit.Misspelled" />

<!-- We use trigger_error extensively -->
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_trigger_error" />

<!-- ToDo: Remove these exceptions overttime -->
<!-- These are for legacy reasons, as EditFlow's main file cannot be altered -->
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="Universal.Files.SeparateFunctionsFromOO.Mixed" />
<exclude name="PEAR.NamingConventions.ValidClassName.StartWithCapital" />
<exclude name="PEAR.NamingConventions.ValidClassName.Invalid" />
<!-- Allow not returning after the setup theme filter for now -->
<exclude name="WordPressVIPMinimum.Hooks.AlwaysReturnInFilter.MissingReturnStatement" />
<!-- Localization is done in a legacy manner in some places, and its ben left as is for now -->
<exclude name="WordPress.WP.I18n.InterpolatedVariableSingular" />
<exclude name="WordPress.WP.I18n.InterpolatedVariablePlural" />
<exclude name="WordPress.WP.I18n.MissingSingularPlaceholder" />
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralText" />

<!-- This rule is hard to solve given the heavy use of JS in the PHP code right now -->
<exclude name="Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure" />
</rule>
Expand Down

0 comments on commit 0c6d169

Please sign in to comment.