Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wp-code-sniffer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
wp-code-sniffer
Merge requests
!4
Draft: feat: add YoastCS for WP Desk Sniffer
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Closed
Draft: feat: add YoastCS for WP Desk Sniffer
feature/add-yoast-cs
into
master
Overview
0
Commits
1
Pipelines
1
Changes
2
Closed
Krzysztof Dyszczyk
requested to merge
feature/add-yoast-cs
into
master
4 years ago
Overview
0
Commits
1
Pipelines
1
Changes
2
Propozycja Coding Standards bazująca na
YoastCS
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
12877d61
1 commit,
4 years ago
2 files
+
34
−
20
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
WPDeskPlugin/ruleset.xml
+
32
−
19
View file @ 12877d61
Show full file
@@ -2,30 +2,43 @@
<ruleset
name=
"WPDeskPlugin"
>
<description>
Sniffs for WordPress WPDesk plugins
</description>
<config
name=
"testVersion"
value=
"5.6-"
/>
<arg
name=
"extensions"
value=
"php"
/>
<exclude-pattern>
tests/*
</exclude-pattern>
<exclude-pattern>
scoper.inc.php
</exclude-pattern>
<rule
ref=
"PHPCompatibility"
/>
<rule
ref=
"WordPress"
/>
<arg
name=
"extensions"
value=
"php"
/>
<!-- Set the minimum supported WP version. This is used by several sniffs.
The minimum version set here should be in line with the minimum WP version
as set in the "Requires at least" tag in the readme.txt file. -->
<config
name=
"minimum_supported_wp_version"
value=
"5.0"
/>
<rule
ref=
"Yoast"
>
<exclude
name=
"Yoast.NamingConventions.ValidHookName"
/>
<!-- Stick to PSR-4 -->
<exclude
name=
"Yoast.Files.FileName"
/>
<exclude
name=
"Yoast.NamingConventions.NamespaceName"
/>
<exclude
name=
"Yoast.Files.TestDoubles"
/>
<exclude
name=
"Yoast.ControlStructures.IfElseDeclaration.NewLine"
/>
<!-- Overwrite PHPCompatibility for PHP 7.0 -->
<exclude
name=
"PHPCompatibility"
/>
<!-- Do not demand function or file comments. Rely on strong typing and descriptive names instead. -->
<exclude
name=
"Squiz.Commenting.FunctionComment"
/>
<exclude
name=
"Generic.Commenting.DocComment.MissingShort"
/>
<exclude
name=
"Yoast.Commenting.FileComment.Missing"
/>
</rule>
<!-- Remove checking if classes are in class- files -->
<rule
ref=
"WordPress.Files.FileName"
>
<exclude-pattern>
/class*/.*\.php
</exclude-pattern>
</rule>
<exclude-pattern>
scoper.inc.php
</exclude-pattern>
<rule
ref=
"WordPress.Files.FileName.InvalidClassFileName"
>
<exclude-pattern>
/class*/.*\.php
</exclude-pattern>
<!-- Use less strict commenting rules for tests, but still apply most of them. -->
<rule
ref=
"Squiz.Commenting.ClassComment.Missing"
>
<exclude-pattern>
tests/*
</exclude-pattern>
</rule>
<rule
ref=
"
WordPress.Nam
in
g
Co
nv
ent
ions.ValidVariableName
"
>
<exclude-pattern>
/class*/.*\.php
</exclude-pattern>
<rule
ref=
"
Squiz.Commenting.Inl
in
e
Co
mm
ent
.InvalidEndChar
"
>
<exclude-pattern>
tests/*
</exclude-pattern>
</rule>
<rule
ref=
"
Generic.Commenting.DocComment.MissingShort
"
>
<exclude-pattern>
\.php
</exclude-pattern>
<rule
ref=
"
WordPress.Security
"
>
<exclude-pattern>
tests/*
</exclude-pattern>
</rule>
<config
name=
"testVersion"
value=
"7.0-"
/>
<rule
ref=
"PHPCompatibility"
/>
</ruleset>
Loading