Drupal.Commenting.VariableComment.WrongStyle fires for missing comments like:

class TestConfigEntityWithPluginCollections extends ConfigEntityBaseWithPluginCollections {

  protected $pluginCollection;

Is @var comment really mandatory? If so, I think we should have a separate sniff code for this.

CommentFileSizeAuthor
#4 2909393-4.patch3.08 KBzaporylie
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mfernea created an issue. See original summary.

zaporylie’s picture

Issue tags: +DevDaysTransylvania

Briefly talked with @klausi and adding new sniff doesn't sound like a bad option.

zaporylie’s picture

...or not :) We already have Drupal.Commenting.VariableComment.MissingVar and put it there? Alternatively, as in VariableCommentSniff from upstream Squiz/Sniffs, we can use Drupal.Commenting.VariableComment.Missing

zaporylie’s picture

Title: Drupal.Commenting.VariableComment.WrongStyle - Fires for missing comments » Find missing comments for member variables
Status: Active » Needs review
FileSize
3.08 KB

Here's the patch that syncs downstream VariableComment.Missing.

klausi’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev
Status: Needs review » Needs work

Nice, looks good! Can you file a pull request against https://github.com/pfrenssen/coder so that we see the tests run there?

zaporylie’s picture

Status: Needs work » Needs review
klausi’s picture

Status: Needs review » Fixed

Committed, thanks a lot!

  • klausi committed 9ac24f2 on 8.x-3.x authored by zaporylie
    fix(VariableComment): Find missing comments for member variables (#...

Status: Fixed » Closed (fixed)

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