diff --git a/lib/jsdoc.js b/lib/jsdoc.js index da3a172..65f21db 100644 --- a/lib/jsdoc.js +++ b/lib/jsdoc.js @@ -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++); diff --git a/test/lib/rules/validate-jsdoc/check-redundant-params.js b/test/lib/rules/validate-jsdoc/check-redundant-params.js index 94cc46e..9f53dd8 100644 --- a/test/lib/rules/validate-jsdoc/check-redundant-params.js +++ b/test/lib/rules/validate-jsdoc/check-redundant-params.js @@ -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 */ ]); diff --git a/test/lib/rules/validate-jsdoc/check-redundant-returns.js b/test/lib/rules/validate-jsdoc/check-redundant-returns.js index 3c13525..bde9239 100644 --- a/test/lib/rules/validate-jsdoc/check-redundant-returns.js +++ b/test/lib/rules/validate-jsdoc/check-redundant-returns.js @@ -4,8 +4,8 @@ describe('rules/validate-jsdoc', function () { }); describe('check-redundant-returns', function() { - checker.rules({checkRedundantReturns: true}); + checker.cases([ /* jshint ignore:start */ {