-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not remove "class foo" comments. #122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disagree here: "class foo" in comments is easily replaced by @see FQCN
instead, which is more valuable.
@Ocramius the issue at hand is "Initializes this instance with the specified document manager, unit of work and\nclass metadata." being unduly truncated, "Initializes this instance with the specified document manager, unit of work and\n@see foo" would raise some eyebrows :P . IMO the right fix would be to remove it iff it the line before is |
@@ -10,7 +10,8 @@ | |||
use Doctrine\Sniffs\Spacing\ControlStructureSniff; | |||
|
|||
/** | |||
* Description | |||
* Description of the | |||
* class example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build fails, you are probably supposed to add this in the output class too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue is easily worked around by splitting the sentence differently. I think few false positives with this workaround are better than missing some some useless comments.
Come on, this is a hack for a broken rule |
I wouldn't say it's broken, just imperfect. And let's not make "hack" word even more meaningless than it is. Hitting enter at different part of sentence is hardly hacking. Regex could be improved by taking preceding content into consideration. Just making it case sensitive is lazy solution impacting false negatives too much IMHO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on the context of the comment, I agree with @Ocramius to add @see
. But something like a broken build because of class foo
in a comment is an unexpected behavior for a user, which is why I'm for this change. "class" won't always be a reference to another class in a comment:
/**
* Lorem ipsum dolor sit amet. That is why we like to have our
* class final
*/
|
Discovered in doctrine/mongodb-odm#2014 (comment)