Problem: when you have an @see reference in a @param documentation then Coder Complains about indentation and tag grouping errors:

/**
 * Short description.
 *
 * @param string $a
 *   This parameter is super.
 *   @see my_function()
 */
function test31($a) {

}
 8 | ERROR | [x] Expected 1 space after asterisk; 3 found (Drupal.Commenting.DocCommentAlignment.SpaceAfterStar)
 8 | ERROR | [x] Separate the @param and @see sections by a blank line.
   |       |     (Drupal.Commenting.DocComment.TagGroupSpacing)
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------

But @see is special and should not be considered a different tag group. As a simple fix we can just ignore it in the 2 sniffs.

Comments

klausi created an issue. See original summary.

  • klausi committed 4337ddf on 8.x-3.x
    fix(DocCommentAlignment): Allow @see references to be indented under @...
klausi’s picture

Status: Active » Fixed

Committed a fix.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.