Automattic / phpcs-neutron-standard

A set of phpcs sniffs for PHP >7 development
MIT License
94 stars 7 forks source link

Disable Generic.Arrays.DisallowShortArraySyntax.Found #81

Closed johnbillion closed 4 years ago

johnbillion commented 4 years ago

When using Neutron with WordPress-Extra, you can't use short array syntax because WordPress-Extra disallows it (Generic.Arrays.DisallowShortArraySyntax.Found) but you also can't use long array syntax because Neutron disallows it (NeutronStandard.Arrays.DisallowLongformArray.LongformArray).

Is it possible for Neutron to exclude Generic.Arrays.DisallowShortArraySyntax.Found by default so it doesn't need to be excluded on a per-project basis when used in conjunction with WordPress-Extra?

sirbrillig commented 4 years ago

This was actually exactly the reason for creating phpcs-neutron-ruleset which combines NeutronStandard with WordPress but disables things that conflict.

johnbillion commented 4 years ago

Cheers, I'll give that a try.