Skip to content

More comprehensive standard #12

Closed as not planned
Closed as not planned
@ghost

Description

Our custom Backdrop standard currently imports certain sniffs from other standards, as well as adding our own sniffs. However I believe a more comprehensive solution would be to include the full, third-party standards, and then exclude certain sniffs that don't meet our needs.

To copy my explanation from #8:

I [...] decided to try building a standard from scratch to see what sniffs we needed and which we didn't. Here's what I've spent some time over the last few weeks doing:

  • Setup a new, blank standard that includes all Generic and Squiz sniffs
  • Run that over Backdrop core
  • For each issue flagged that was a legitimate issue with our code, I noted that sniff/message as a good one
  • For each issue flagged that isn't a problem with our code, I excluded that sniff/message (i.e. it's a bad one)

This eventually helped me to come up with a list of good and bad sniffs.

Of the ~119 sniff messages in the Generic standard, I excluded ~55 bad ones.
Of the ~323 sniff messages in the Squiz standard (that weren't already included in the Generic standard), I excluded ~92 bad ones.

So as you can see, it seems to be better to include the full Generic and Squiz standards, [than to] exclude specific sniffs/messages that don't match our coding standards (rather than just including specific sniffs as we do now).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions