gocodebox / lifterlms-cs

PHP_CodeSniffer rules for LifterLMS projects
MIT License
3 stars 4 forks source link

Allow Direct DB Queries and usage of `meta_key` and `meta_value`? #2

Closed thomasplevy closed 4 years ago

thomasplevy commented 4 years ago

There's some rules that we nearly always ignore. Should we remove these rules at the library level so as to not require always ignoring rules we're simply okay with using?

These rules could be disabled: WordPress.DB.DirectDatabaseQuery.DirectQuery WordPress.DB.SlowDBQuery.slow_db_query_meta_key WordPress.DB.SlowDBQuery.slow_db_query_meta_value WordPress.DB.SlowDBQuery.slow_db_query_meta_query WordPress.DB.SlowDBQuery.slow_db_query_tax_query

I think we should keep the DB caching rule to help us remember to use cashing where possilbe: WordPress.DB.DirectDatabaseQuery.NoCaching

thomasplevy commented 4 years ago

@eri-trabiccolo thoughts?

eri-trabiccolo commented 4 years ago

@thomasplevy Actually I always thought they were there as reminder of something we could improve in the future... I have no other objection than this...

Edit: Oh that's what you said for the direct query.no caching so yeah I agree with you 100%