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

[New sniff] No short open tags in XML #95

Open
3 tasks
jrfnl opened this issue Dec 18, 2016 · 0 comments
Open
3 tasks

[New sniff] No short open tags in XML #95

jrfnl opened this issue Dec 18, 2016 · 0 comments

Comments

@jrfnl
Copy link
Contributor

jrfnl commented Dec 18, 2016

Rule type:

Error

Rule:

Don't use short open tags in XML

XML short open tags could in certain cases be confused with PHP short open tags. Neither should be used. PHP short open tags is in issue #2 and implemented in #6.

Theme check file covering this rule:

https://github.com/WordPress/theme-check/blob/323f266956a2b8f714e28468b0bd6bdb24730743/checks/phpshort.php

Notes for implementation:
  • This sniff is similar to the Generic.PHP.DisallowShortOpenTag sniff.
  • The sniff should potentially check both XML files (if possible) as well as check XML which is being created via PHP.

To do:

  • If deemed necessary: Add/clarify the rule in the Theme Review handbook
  • Create unit tests
  • Create new sniff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants