From 2a4d1250d1b5b884592de392c587c2032ef2b462 Mon Sep 17 00:00:00 2001 From: Kevin Locke Date: Wed, 24 Feb 2016 11:36:35 -0800 Subject: [PATCH] Remove dead code for allowUnknownTags checking When tagDef is falsey the previous if block is entered and the function always returns. Therefore, this code block can never be entered. If it could, it would log the same error as above. Remove it. Signed-off-by: Kevin Locke --- lib/jsdoc/tag/validator.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/jsdoc/tag/validator.js b/lib/jsdoc/tag/validator.js index b3a8bd8c..0e78bf6e 100644 --- a/lib/jsdoc/tag/validator.js +++ b/lib/jsdoc/tag/validator.js @@ -37,10 +37,7 @@ exports.validate = function(tag, tagDef, meta) { } // check for errors that make the tag useless - if (!tagDef && !env.conf.tags.allowUnknownTags) { - logger.error( buildMessage(tag.title, meta, 'is not a known tag') ); - } - else if (!tag.text && tagDef.mustHaveValue) { + if (!tag.text && tagDef.mustHaveValue) { logger.error( buildMessage(tag.title, meta, 'requires a value') ); }