phpcs does NOT display the relevant name of the sniff when a sniff fails.
By adding the
-s argument, the sniff names will be displayed. See the following from
-s Show sniff codes in all reports
You can add this to your PHP CodeSniffer XML Ruleset with the following:
<!-- Append arg -s to phpcs to display the name of failed sniffs -->
Editor Specific Configurations
Vim with ALE Plugin
In Vim (or Neovim) using the ALE Plugin the sniff name is displayed by default. However, sometimes longer sniffs get truncated. In this case, you can run the command
which will display a list of messages that have been displayed (including the full version of the sniff name).