diff --git a/main.js b/main.js index c38b3e2a..9d981b42 100644 --- a/main.js +++ b/main.js @@ -159,7 +159,7 @@ function main() { require('jsdoc/src/handlers').attachTo(app.jsdoc.parser); docs = app.jsdoc.parser.parse(sourceFiles, env.opts.encoding); -dump(docs); exit(0); +//dump(docs); exit(0); if (env.opts.expel) { dump(docs); exit(0); diff --git a/modules/jsdoc/tag/dictionary/definitions.js b/modules/jsdoc/tag/dictionary/definitions.js index cf9df00b..7b570478 100644 --- a/modules/jsdoc/tag/dictionary/definitions.js +++ b/modules/jsdoc/tag/dictionary/definitions.js @@ -171,6 +171,15 @@ } }); + dictionary.defineTag('ignore', { + mustNotHaveValue: true, + onTagged: function(doclet, tag) { + doclet.ignore = true; + + return true; + } + }); + dictionary.defineTag('inner', { onTagged: function(doclet, tag) { setDocletScopeToTitle(doclet, tag); diff --git a/test/cases/ignoretag.js b/test/cases/ignoretag.js new file mode 100644 index 00000000..4e8c2121 --- /dev/null +++ b/test/cases/ignoretag.js @@ -0,0 +1,6 @@ +/** + @ignore +*/ +function foo(x) { + +} diff --git a/test/runner.js b/test/runner.js index 6dc2f0f1..4ae17789 100644 --- a/test/runner.js +++ b/test/runner.js @@ -95,6 +95,7 @@ testFile('test/t/cases/copyrighttag.js'); testFile('test/t/cases/deprecatedtag.js'); testFile('test/t/cases/exceptiontag.js'); testFile('test/t/cases/globaltag.js'); +testFile('test/t/cases/ignoretag.js'); report(); diff --git a/test/t/cases/ignoretag.js b/test/t/cases/ignoretag.js new file mode 100644 index 00000000..c18eabca --- /dev/null +++ b/test/t/cases/ignoretag.js @@ -0,0 +1,11 @@ +(function() { + var docSet = testhelpers.getDocSetFromFile('test/cases/ignoretag.js'), + foo = docSet.getByLongname('foo')[0]; + + //dump(docSet.doclets); + + test('When a symbol has an @ignore tag, the doclet has a ignore property set to true.', function() { + assert.equal(foo.ignore, true); + }); + +})(); \ No newline at end of file