WPThemeReview icon indicating copy to clipboard operation
WPThemeReview copied to clipboard

[New sniff] No short open tags in XML

Open jrfnl opened this issue 9 years ago • 0 comments

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

jrfnl avatar Dec 18 '16 10:12 jrfnl