-
Notifications
You must be signed in to change notification settings - Fork 510
Added "textblock" value to requireCapitalizedComments #769
Conversation
I don't understand the coveralls message, but happy to fix it. |
@@ -1,34 +1,92 @@ | |||
var Checker = require('../../lib/checker'); | |||
var assert = require('assert'); | |||
|
|||
describe('rules/require-capitalized-comments', function() { | |||
describe.only('rules/require-capitalized-comments', function() { |
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.
oh it's probably the .only
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.
mocha allows you to filter tests: mocha debug -b -g 'require-capitalized-comments'
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.
Whoops! I forgot to remove that.
Good work! I don't think we need a new option value here. @mrjoelkemp already stated that he considers this a bug. |
@mikesherov ok. I'll remove the check for it. |
… since jscs-dev#767 was a bug not a feature.
💯 |
].join('\n')).getErrorCount() === 1); | ||
}); | ||
|
||
it('should report on multiple uppercase lines in multiple "textblocks"', function() { |
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.
should not report
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.
Yup. Typo
Really interesting test cases @indexzero. Great job on this. I'll take a closer look through the implementation and edge cases tonight (hopefully). |
…zedComments [test] Add more tests that also include the examples in README.md
@mrjoelkemp thanks. I actually just made a small change to support sentence breaks in textblocks which are perfectly valid.
Actually checking for |
var checker; | ||
|
||
// Remark (indexzero): Test helper which makes multi-line comment testing look cleaner |
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.
Just an fyi, we typically don't include the name of the committer in the code; that info could be found via git blame
. I'll remove post-merge.
It's also pretty clear that the helper cleans things up a bit.
@indexzero this looks great. thanks for contributing! I'll fix the travis fail; be sure to run It would be great for parity if you could also enhance |
@indexzero Filed an issue for disallowCapitalizedComments. #775 |
This makes the most sense to me right now. If you're good with this implementation then I'll add the docs to this PR as well. Fixes #767.