WPTT / theme-sniffer

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

Exclude Folder Option #145

Open DannyCooper opened 5 years ago

DannyCooper commented 5 years ago

In the case where a theme is using a library (Kirki, TGMPA, etc.) it would be useful to have a text field to enter directories that shouldn't be scanned.

Examples:

/vendor
/TGMPA
/inc/kirki
joyously commented 5 years ago

But libraries must meet the requirements also.

DannyCooper commented 5 years ago

Yes, but for universally accepted libraries like the ones I mentioned, they don’t need to be scanned for each theme.

Assuming they are up to date.

joyously commented 5 years ago

I'd rather have them scanned than give the author an option to skip stuff. And how do you assume they are up to date without scanning?

DannyCooper commented 5 years ago

The tool is for reviewers as much as authors. As a reviewer I’m checking the library versioning manually anyway.

dingo-d commented 5 years ago

Currently, vendors and node_modules are excluded. The reasoning is that you may have those folders during development, but they shouldn't (vendors maybe should in some cases) be scanned as they would most certainly crash the sniffer or report on tons and tons of code that may not end up in the theme in the end.

As for kirki and TGMPA we should check them, because you never know what kind of code may be included. Somebody can say: I included TGMPA but puts his/hers own evil code inside...