WordPress / WordPress-Coding-Standards

PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions
MIT License
2.51k stars 468 forks source link

Check that hooks follow documentation standards #424

Open JDGrimes opened 8 years ago

JDGrimes commented 8 years ago

Forked from https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/241#issuecomment-133562703.

GaryJones commented 7 years ago

Even if the full filter DocBlock couldn't be fully checked yet, at least allowing DocBlocks before lines that contain add_filter(, do_action(, do_action_ref_array(, or apply_filters_ref_array(, would allow us to remove the Squiz.Commenting.BlockComment.WrongStart exclusion, so it can highlight any incorrect DocBlocks elsewhere.

(Actually, because of the need to ignore /** translators: ... */ too, this probably needs a bit more thought on it's own.)