I ran PAReview.sh on my module: http://ventral.org/node/146/revisions/495/view . It correctly found several errors, including

// This comment lacks ending punctuation

However, it did not notice

// This comment lacks ending punctuation (like the last one)

Comments

klausi’s picture

Yes, the sniff is conservative because comments can also look like this:

// @see my_function()

This does not require punctuation at the end as it is not a sentence. The sniff ignores comments where the last word contains non-alpha characters (I think). Anyway, patches welcome.

pdrake’s picture

Status: Active » Fixed

Fixed (http://drupalcode.org/project/drupalcs.git/commit/3490b5f). The inline comment punctuation detection now handles the following scenarios properly:

// This comment lacks ending punctuation
test();

// This comment lacks ending punctuation (like the last one)
test();

// This is a function call (pass in $test)
test($test);

// This is another call to a function (test)
test();

// Don't forget to unset $user
unset($user);

// @see test()
test();

// @todo remove
$user = 1;

Status: Fixed » Closed (fixed)

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