-
Notifications
You must be signed in to change notification settings - Fork 51
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
Incomplete attempt at @todo capitalization enforcement. #174
base: 8.3.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,9 @@ | |
* These are valid examples. | ||
* | ||
* @todo Valid. | ||
* @todo valid with lower-case first letter | ||
* @todo $can start with a $ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be valid, one could document a variable name like "@todo $entity could be NULL here, fix this later in foo_fcuntion()." |
||
* @todo \also with backslash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, backslash should be valid. "@todo \Drupal should not be used here, implement dependency injection later". |
||
* @todo Valid | ||
* @todo Multiple words are valid. | ||
* @todo Multiple words are valid | ||
* | ||
* These are all incorrect but can be fixed automatically. | ||
* | ||
|
@@ -38,6 +38,7 @@ | |
* @todo | ||
* @to-do | ||
* @TODO | ||
* @todo this should be uppercase | ||
*/ | ||
|
||
/** | ||
|
@@ -46,6 +47,7 @@ | |
function foo() { | ||
// These are valid examples. | ||
// @todo Valid. | ||
// These are invalid since they don't start with a capital letter. | ||
// @todo valid with lower-case first letter | ||
// @todo $can start with a $ | ||
// @todo \also with backslash | ||
|
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.
this is tricky. We want to warn about lower case characters, but allow everything else. Even lower case characters should be allowed in some cases, for example
@todo some_function() is not a good name, refactor it to a better name
.I think we have code somewhere else in Coder that checks for such things in some comment standard, we should check that.