jscs-dev / jscs-jsdoc

JsDoc validation rules for jscs
MIT License
99 stars 35 forks source link

New Rule: Require Description to be a complete sentence. #106

Closed dtracers closed 9 years ago

dtracers commented 9 years ago

This is something that checkstyle has in java and I think I might implement this rule.

Where a complete sentence one that must start with a capitol letter and end end with a period. This can also be added with the description requires a new line and we can say that the first sentence must have a separate line from the other sentences (even if both sentences are on the same line)

Basically an example is

/**
 * This is a valid description.
 */
function foo() {
}

/**
 * this is invalid.
 */
function bar() {
}

/**
 * This is also invalid
 */
function foobar() {
}

The extra combined rule with the newline and the complete sentence are both true.

/**
 * This is the first sentence. This second sentence must be on a new line
 */
function func() {
}
qfox commented 9 years ago

Sounds good!

dtracers commented 9 years ago

How do you feel about the combined rule of the new line and the sentence?

Or do you think that should be in the description must be a single complete sentence on one line by default?

dtracers commented 9 years ago

Actually I am going to make a new rule for this.

dtracers commented 9 years ago

associated pull request #109

qfox commented 9 years ago

Actually I am going to make a new rule for this.

:tada: Agreed!

Associated pull request #109

I've left few notes there, some of them can be discussed, looks good at all!

qfox commented 9 years ago

Thanks again, landed at master, will publish this asap! :palm_tree:

dtracers commented 9 years ago

Awesome Thanks!

I will probably be making some new rules tonight as well. On Jun 9, 2015 10:54 AM, "Alexej Yaroshevich" notifications@github.com wrote:

Thanks again, landed at master, will publish this asap! [image: :palm_tree:]

— Reply to this email directly or view it on GitHub https://github.com/jscs-dev/jscs-jsdoc/issues/106#issuecomment-110430873 .