Skip to content

Consider silencing the UnusedVariable violation #498

@GaryJones

Description

@GaryJones

From #449:

We could also take this opportunity is taken to silence the UnusedVariable violation. It's severity is already dropped down to 1 for WordPress-VIP-Go, which is the same as what the bot runs at (though this may change in the future). From a VIP perspective, unused variables are not important.

What problem would the enhancement address for VIP?

It would reduce the number of violation comments. Although it's not ideal to have values being to variables that are then unused (waste of memory), it's not a severe enough impact to typically worry about.

If clients were keen on this, they could run the VariableAnalyis sniff (or static analysis tools or the inspector plugin for PHPStorm), to find these.

Describe the solution you'd like

Discuss and consider silencing the UnusedVariable violation.

What code should be reported as a violation?

...

What code should not be reported as a violation?

...

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions