Skip to content

Commit 03b049a

Browse files
committed
Merge pull request #42 from zxqfox/hotfix/iteration-filtering-bug
fixup critical bug with filtering tags
2 parents fd8617b + 3422496 commit 03b049a

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

lib/jsdoc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function DocComment(value, loc) {
6868
var k = 0;
6969
types = Array.isArray(types) ? types : [types];
7070
this.tags.forEach(function(tag) {
71-
if (types.indexOf(tag.name) !== -1) {
71+
if (types.indexOf(tag.id) === -1) {
7272
return;
7373
}
7474
fn.call(this, tag, k++);

test/lib/rules/validate-jsdoc/check-redundant-params.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,21 @@ describe('rules/validate-jsdoc', function () {
7474
}
7575
};
7676
}
77+
78+
}, {
79+
it: 'should not report redundant params',
80+
code: function () {
81+
/**
82+
* Test
83+
*
84+
* @param {String} mystr
85+
* @return {String}
86+
*/
87+
exports.testStr = function(mystr) {
88+
'use strict';
89+
return mystr;
90+
};
91+
}
7792
}
7893
/* jshint ignore:end */
7994
]);

test/lib/rules/validate-jsdoc/check-redundant-returns.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ describe('rules/validate-jsdoc', function () {
44
});
55

66
describe('check-redundant-returns', function() {
7-
87
checker.rules({checkRedundantReturns: true});
8+
99
checker.cases([
1010
/* jshint ignore:start */
1111
{

0 commit comments

Comments
 (0)