Line 43: @see should always be followed by a filename, a url or a function name with ()
* @see EntityFieldQuery::deleted()

Comments

pillarsdotnet’s picture

Status: Active » Needs review
StatusFileSize
new1.17 KB

Patch/fix:

pillarsdotnet’s picture

Title: Coder does not recognize method names as functions » Coder does not recognize class or method names in @see blocks.

A related bug is that it demands parentheses after class names, which I'm told is incorrect.

sun’s picture

StatusFileSize
new3.97 KB

Indeed. Here's a patch that confirms the bug.

pillarsdotnet’s picture

sun’s picture

StatusFileSize
new4.83 KB

oh, no testbot for Coder? Odd.

The intention of #3 obviously was to prove that expectations are failing (after adding them). But without testbot, that's kinda pointless ;)

So here's the merged and minimally fixed patch, but the change to the regex doesn't look correct to me. (EDIT: ...and fails tests)

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

The regex looks good. Patch still applies.

fgm’s picture

Status: Reviewed & tested by the community » Needs work

Not sure whether this should be included in this patch version, but is also erroneously flags functions in namespaces. For instance this triggers the warning:

namespace Foo {
  function bar() { 
  }
}

/**
 * Implements hook_somehook().
 *
 * @see Foo\bar()
 */
function foo_somehook() {
}

Since namespaces are fast becoming more common since D8 started and their inclusion in the coding standards (http://drupal.org/node/1353118), the patch should probably address them too.

megachriz’s picture

Marked #1455950: @see MyClass::myMethod() is not allowed as a duplicate of this issue.

skwashd’s picture

Issue summary: View changes

This patch doesn't apply anymore. Even after a reroll a lot of the tests fail.

klausi’s picture

Status: Needs work » Closed (won't fix)

Coder 7.x-1.x is frozen now and will not receive any updates. Coder 8.x-2.x can be used to check code for any Drupal version, Coder 8.x-2.x also supports the phpcbf command to automatically fix conding standard errors. Please check if this issue is still relevant and reopen against that version if necessary.