WPTT / theme-sniffer

Theme Sniffer plugin using sniffs.
MIT License
270 stars 3 forks source link

Exclude JS file in sniffing #109

Closed ernilambar closed 5 years ago

ernilambar commented 5 years ago

For example when there is modernizr.min.js, sniffer shows error ERROR Stylesheets must be registered/enqueued via wp_enqueue_style

May be we need to exclude JS file from such check.

dingo-d commented 5 years ago

There is a checkbox to sniff only PHP files, and I'm checking for a minimised files here:

https://github.com/WPTRT/theme-sniffer/blob/ccb7bc0682c07bddccaab259d2162a846b6bc06e/src/callback/class-run-sniffer-callback.php#L376-L381

Although this is a super tricky thing to check so any sanity checking is welcomed 🙂

dingo-d commented 5 years ago

Fixed in the latest release