This commit creates a template named `silent` which outputs nothing at
all. As discussed in the `README.md`, this can be useful when running
JSDoc as a linter to check for syntax errors or unknown tags. It may
also be useful for testing or benchmarking.
The same effect can be achieved using the haruki template and
redirecting the output to /dev/null, but this has a few downsides:
* It is non-obvious.
* It is difficult to do in scripts which must run in bash and cmd.exe
(like npm scripts).
* It is slower due to the unnecessary formatting work and output
syscalls.
This template could be distributed as a third-party template, but given
the tiny code size, broad applicability, and potential usefulness for
tests, it makes sense to include it officially.
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
This commit adds support for specifying an Array of tags which are
unknown to JSDoc, but allowed without error. It provides a more
granular way to disable such errors while retaining the benefits of
catching errant tags (e.g. typos).
The intended use case is catching errant tags when using additional
tools which support tags not recognized by JSDoc (e.g. Closure Compiler
and the tags discussed in #605).
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
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 <kevin@kevinlocke.name>
This commit makes the test suite run test/specs/jsdoc/src/astnode.js
It was previously skipped because of the runtime being node and
astnode.js containing "node"..
I even wonder if its still relevant to try to support different
runtime, but that's for another PR I guess.
- tightened-up detection of the correct path for the plugins by checking if the plugin file *itself* actually exists in the given path; it's done this way to cope with scenarios where JSDoc is executed in another project's working directory where *that* project has plugins of itself in a similar directory structure (`plugins/*`).
We DO NOT change the search path used by JSDoc.
- ditto for templates: we know that a template MUST have a `publish.js` file at least, so we go and check if that one exists at the location where we would otherwise have assumed it does.