Skip to content

New Rule: Require Param Description#111

Closed
dtracers wants to merge 42 commits intojscs-dev:masterfrom
dtracers:master
Closed

New Rule: Require Param Description#111
dtracers wants to merge 42 commits intojscs-dev:masterfrom
dtracers:master

Conversation

@dtracers
Copy link
Copy Markdown
Contributor

New Rule that allows one to require a parameter description

Address #107

@dtracers
Copy link
Copy Markdown
Contributor Author

I am not sure how to remove these other commits...

But this is a new rule!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd do here early return because we don't need to check "nothing" ;-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! Do you want me to change the require parameter type. (That
is what I copied this from)
On Jun 15, 2015 12:42 PM, "Alexej Yaroshevich" [email protected]
wrote:

In lib/rules/validate-jsdoc/require-param-description.js
#111 (comment):

+module.exports.tags = ['param', 'arg', 'argument'];
+module.exports.scopes = ['function'];
+module.exports.options = {

  • requireParamDescription: {allowedValues: [true]}
    +};

+/**

  • * Validator for @param
  • * @param {(FunctionDeclaration|FunctionExpression)} node
  • * @param {DocTag} tag
  • * @param {Function} err
  • */
    +function validateParamTagDescription(node, tag, err) {
  • // checking existance
  • if (!tag.description) {

I'd do here early return because we don't need to check "nothing" ;-)


Reply to this email directly or view it on GitHub
https://github.com/jscs-dev/jscs-jsdoc/pull/111/files#r32452339.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm, in separate commit — yes ;-)

@qfox
Copy link
Copy Markdown
Member

qfox commented Jun 15, 2015

I am not sure how to remove these other commits...

I'm trying to support convention from JSCS here, in JSCS we using http://jscs.info/contributing.html#pull-requests jQuery commit message guidelines.

To rebuild your git history you can use:

git remote add upstream https://github.com/jscs-dev/jscs-jsdoc.git
git fetch upstream
git rebase -i upstream//master

and then squash needed commits by their semantic.

p.s. Personally I'm using a lot: git pull --rebase upstream master as a shortcut for git fetch upstream; git rebase upstream/master

dtracers added 8 commits June 21, 2015 13:47
Fixed a null value being assigned in the case that documentation does
not exist
The rule works! It catches every instance of this!

But we do not want it on right now.
I left the regular expression with only \n because if it splits at end
of input then it will have an extra empty array
The test was looking for an error when it should not have been… :/
dtracers added 15 commits June 21, 2015 13:47
Build should now work!
This is a lot more specific now in terms of requirements.
# The first commit's message is:
added new rule: require-description-complete-sentence

# This is the 2nd commit message:

removed extra semi-colon

# This is the 3rd commit message:

removed duplicate assignments

# This is the 4th commit message:

fixed null value being assigned

Fixed a null value being assigned in the case that documentation does
not exist

# This is the 5th commit message:

turned off rule by default

The rule works! It catches every instance of this!

But we do not want it on right now.

# This is the 6th commit message:

fixed the cursor appearing in the wrong location

# This is the 7th commit message:

removed extra line! and fixed potential bug

I left the regular expression with only \n because if it splits at end
of input then it will have an extra empty array

# This is the 8th commit message:

removed error in test.

The test was looking for an error when it should not have been… :/

# This is the 9th commit message:

Should fix location of missing period marker

# This is the 10th commit message:

missing semi colon *facepalm*

# This is the 11th commit message:

missing backslash

# This is the 12th commit message:

changed to matching word character instead of word boundary

# This is the 13th commit message:

changed lines -> line

fixed typo

# This is the 14th commit message:

Fixed build.

Build should now work!

# This is the 15th commit message:

Added tests for multiple lines with period
added new rule: require-description-complete-sentence

removed extra semi-colon

removed duplicate assignments

fixed null value being assigned

Fixed a null value being assigned in the case that documentation does
not exist

turned off rule by default

The rule works! It catches every instance of this!

But we do not want it on right now.

fixed the cursor appearing in the wrong location

removed extra line! and fixed potential bug

I left the regular expression with only \n because if it splits at end
of input then it will have an extra empty array

removed error in test.

The test was looking for an error when it should not have been… :/

Should fix location of missing period marker

missing semi colon *facepalm*

missing backslash

changed to matching word character instead of word boundary

changed lines -> line

fixed typo

Fixed build.

Build should now work!

Added readme documentation.

Added tests for multiple lines with period

Changed how the rules work.

This is a lot more specific now in terms of requirements.
@dtracers
Copy link
Copy Markdown
Contributor Author

okay I changed it around... I also somehow made everything worse in terms of commit history while trying to fix it... :/ lol

I will probably just delete the repo after this is merged in and then fork it again.

@qfox
Copy link
Copy Markdown
Member

qfox commented Jun 22, 2015

Do you mind if I squash all of these to 1 commit? ;-)

@dtracers
Copy link
Copy Markdown
Contributor Author

please do! I was trying to do it locally and ended duplicating every single one... twice...
:/

@qfox qfox closed this in bf19a6c Jun 24, 2015
jdlrobson pushed a commit to jdlrobson/jscs-jsdoc that referenced this pull request Aug 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants