jsdoc3/jsdoc — pull request #141 by hegemonic (2012-07-05 07:20:47+00:00)
Title: --strict option doesn't work correctly

It turns out that my fix for #134 doesn't work correctly. For a couple of reasons*, the `--strict` command-line option is broken. Mea culpa.

This pull request replaces the broken `--strict` command-line option with a working `--lenient` command-line option. The `--lenient` option is disabled by default, so JSDoc's default behavior hasn't changed from #134: If a doclet can't be validated, JSDoc exits.

(I also fixed an issue in the test: `console.log` now actually works after the test runs. How embarrassing.)

I didn't want to change the name of the command-line option, but when `common/args` sees `--foo false`, it treats `false` as a string rather than a boolean. I decided I'd rather work within the limitations of `common/args` than write code like `if (foo === false || foo === "false")`. I can redo this change if people like `--strict false` better than `--lenient`.

Again, sorry I didn't get this right the first time!

\* Reason 1: Because the call to `addOption()` passed `false` in the third argument, the option didn't accept a value. Reason 2: Even if you dealt with reason 1, the code in `tag.js` wouldn't have worked, because `common/args` treats all values as strings.