Skip to content

Commit

Permalink
fixup critical bug with filtering tags
Browse files Browse the repository at this point in the history
Fixes #41
Closes #42
  • Loading branch information
Alexej Yaroshevich committed Nov 10, 2014
1 parent fd8617b commit 3422496
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function DocComment(value, loc) {
var k = 0;
types = Array.isArray(types) ? types : [types];
this.tags.forEach(function(tag) {
if (types.indexOf(tag.name) !== -1) {
if (types.indexOf(tag.id) === -1) {
return;
}
fn.call(this, tag, k++);
Expand Down
15 changes: 15 additions & 0 deletions test/lib/rules/validate-jsdoc/check-redundant-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,21 @@ describe('rules/validate-jsdoc', function () {
}
};
}

}, {
it: 'should not report redundant params',
code: function () {
/**
* Test
*
* @param {String} mystr
* @return {String}
*/
exports.testStr = function(mystr) {
'use strict';
return mystr;
};
}
}
/* jshint ignore:end */
]);
Expand Down
2 changes: 1 addition & 1 deletion test/lib/rules/validate-jsdoc/check-redundant-returns.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ describe('rules/validate-jsdoc', function () {
});

describe('check-redundant-returns', function() {

checker.rules({checkRedundantReturns: true});

checker.cases([
/* jshint ignore:start */
{
Expand Down

0 comments on commit 3422496

Please sign in to comment.