I just ran into some weird issues when doing some maintenance on the eightshift-forms (wanted to update CS, and add some exclusions in the phpcs.xml.dist file, so that the plugin doesn't have to have // phpcs:ignore comments in the files), when I noticed that this code was reporting an error on the Components::checkAttr method when it shouldn't:
so the checkAttr shouldn't have been flagged. My guess is since the renderPartial wasn't on the list, but instead was manually ignored, the next call to the Components::checkAttr method was triggering the sniff (even though it shouldn't because it's in the allowed list).
I'm not 100% sure if this is intended behaviour of PHPCS or not, will have to check upstream to be sure.
I just ran into some weird issues when doing some maintenance on the eightshift-forms (wanted to update CS, and add some exclusions in the
phpcs.xml.dist
file, so that the plugin doesn't have to have// phpcs:ignore
comments in the files), when I noticed that this code was reporting an error on theComponents::checkAttr
method when it shouldn't:Added rule was:
so the
checkAttr
shouldn't have been flagged. My guess is since therenderPartial
wasn't on the list, but instead was manually ignored, the next call to theComponents::checkAttr
method was triggering the sniff (even though it shouldn't because it's in the allowed list).I'm not 100% sure if this is intended behaviour of PHPCS or not, will have to check upstream to be sure.