Skip to content
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

CommentAnnotation: an annotation keyword as a start of a sentence #390

Closed
lenntt opened this issue Jul 24, 2013 · 1 comment
Closed

CommentAnnotation: an annotation keyword as a start of a sentence #390

lenntt opened this issue Jul 24, 2013 · 1 comment
Assignees
Labels

Comments

@lenntt
Copy link

lenntt commented Jul 24, 2013

My real problem is:
In my comments, a sentence might start with an annotation keyword, but I don't mean to use it as a keyword.
e.g. "Optimize foo by removing bar"

Unusual, but I ran across a similar case in my own code.

But, might be easier/more inline with other use cases to fix:

  • Being able to configure my own comment annotation keywords
    This works for me, because I don't use all annotation keywords from the style guide.
    And also covers use cases for other uses that might want to add their own keywords (which I don't).

Perhaps a different solution might be to ignore a word that starts with a capital letter and has no colon in it ??? The cop may give more false negatives, but at least it does not restrict your sentences.

@ghost ghost assigned jonas054 Jul 24, 2013
@jonas054
Copy link
Collaborator

I implemented this cop so I feel this is my responsibility. I like your suggestions and I think I should do both:

  • skip an annotation keyword that looks like it's just the first word of a sentence
  • make the list of annotation keywords a configuration parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants