theme-sniffer icon indicating copy to clipboard operation
theme-sniffer copied to clipboard

Exclude Folder Option

Open DannyCooper opened this issue 5 years ago • 5 comments

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

DannyCooper avatar Mar 16 '19 13:03 DannyCooper

But libraries must meet the requirements also.

joyously avatar Mar 16 '19 14:03 joyously

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.

DannyCooper avatar Mar 16 '19 14:03 DannyCooper

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?

joyously avatar Mar 16 '19 14:03 joyously

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

DannyCooper avatar Mar 16 '19 15:03 DannyCooper

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...

dingo-d avatar Mar 30 '19 10:03 dingo-d