WPTT / WPThemeReview

PHP_CodeSniffer rules (sniffs) to enforce WordPress theme review coding conventions
MIT License
208 stars 38 forks source link

Empty Author URI and Theme URI gives error of duplicate URL #199

Closed joyously closed 5 years ago

joyously commented 5 years ago

A theme with neither Author URI nor Theme URI results in an error that the URLs are duplicate.

Each is optional.

jrfnl commented 5 years ago

How are you getting that error ? AFAICS, this doesn't come from the ThemeReview PHPCS sniffs, so should probably be reported elsewhere.

joyously commented 5 years ago

I ran a theme through the Theme Sniffer 0.2.0 RC1 and got it. How can I tell which code is at fault?

jrfnl commented 5 years ago

I haven't used the Theme Sniffer plugin myself yet, but the simplest way I can think of to check whether it is something coming from the Theme Sniffer itself or from TRTCS, would be to run TRTCS over the same code: phpcs -ps ./path/to/theme --standard=WPThemeReview.

If the error doesn't show up in the PHPCS output, the issue is with the Theme Sniffer itself, not TRTCS.

Also handy: running that command will show you the error codes, which makes it easier to report bugs to the right CS repo: TRTCS / WPCS / PHPCS

@dingo-d might be able to give you a better answer.

dingo-d commented 5 years ago

This comes from style_headers_check() method, and is not related to the WPThemeReview but to the theme-sniffer repo 🙂

I'll close the issue here, and open on the correct repo 🙂