462 Commits

Author SHA1 Message Date
Jeff Williams
cae3cce8c1 add longnamesToTree method 2014-07-03 13:53:46 -07:00
Jeff Williams
dcca9a4714 clean up constants exported by jsdoc/name 2014-07-03 12:35:56 -07:00
Jeff Williams
abfa24578c don't log an error when a comment only contains whitespace (#698) 2014-07-02 20:11:39 -07:00
Jeff Williams
254c05fbf6 set the appropriate longname for function declarations in AMD modules (#685)
This is a hack. See #693 for details.
2014-06-29 17:11:55 -07:00
Jeff Williams
dabcb5904f cleanup 2014-06-28 20:21:22 -07:00
Jeff Williams
873480a3ed improve filename creation (#677)
We now allow a much larger range of characters in filenames. We also URL-encode HTML links when necessary, so that everything still works when you upload the files to a web server.
2014-06-28 16:59:01 -07:00
Jeff Williams
873f3dac3d regression test for #683 2014-06-28 08:23:32 -07:00
Jeff Williams
ae0a03af5c if a module exports one symbol, do not treat it as a global, regardless of the symbol's kind (#667)
Plus some test cleanup.
2014-06-20 17:36:49 -07:00
Jeff Williams
8840f30a0b autodetect parameter names in function expressions (#674) 2014-06-20 16:51:36 -07:00
Jeff Williams
941b647d5b prevent type info from overwriting existing doclet properties (#676) 2014-06-19 16:44:38 -07:00
Jeff Williams
6672668b48 add the AST node to doclets as a non-enumerable property by default
This change prevents a lot of clutter when using the `--explain` flag to log doclets to the console.

If the `--debug` flag is enabled, AST nodes are added as enumerable properties.
2014-06-17 21:42:45 -07:00
Jeff Williams
636bd83a17 test cleanup 2014-06-17 21:34:48 -07:00
Jeff Williams
be60e811eb when creating links, do not treat <anonymous> types as type applications, and handle union types without parentheses (#654) 2014-06-15 20:57:08 -07:00
Jeff Williams
eeb9c94c66 validate tags that have no text (#661) 2014-06-15 20:42:44 -07:00
Jeff Williams
a9a6ebd9ce clean up test spec 2014-06-15 20:38:24 -07:00
Jeff Williams
722241dd51 escape HTML characters in code blocks (#635) 2014-06-15 14:12:17 -07:00
Jeff Williams
92c8f101e4 streamline tests 2014-06-15 13:57:30 -07:00
Jeff Williams
5d308963e5 improve test coverage; remove unreachable code; other cleanup 2014-05-27 16:54:38 -07:00
Jeff Williams
43ebd95874 add tests for external tag 2014-05-23 13:29:52 -07:00
Jeff Williams
90b0d21633 improve test coverage 2014-05-21 22:46:47 -07:00
Jeff Williams
1566421a62 give doclets a longname even if the name is empty (#643) 2014-04-26 10:57:10 -07:00
Jeff Williams
f635b10b6f fix comment-attachment issue (#638)
The issue in brief: Within an object literal, if a standalone comment was followed by a commented symbol, the symbol's comment would not be attached correctly.

The fix essentially reverts the changes for #565, which are no longer needed thanks to 50cd99fa2fca753fcf7c9ec3ecf70afd47168e94.

The fix also corrects the order in which we walk a MemberExpression's child nodes. Without this correction, comments would not be attached correctly inside CallExpression nodes.
2014-04-25 21:53:30 -07:00
Jeff Williams
cd9d7f90a7 change 'virtual' to 'abstract' in the template helper (#618) 2014-04-18 16:46:24 -07:00
Jeff Williams
3d1c36a325 keep all type info for return and type tags (#618)
For consistency with method parameters, this change extends our unfortunate practice of adding type properties to the parent of the `type` object, rather than the object itself.
2014-04-15 09:26:19 -07:00
Bill Tutt
821156c01c Fix issue #631: virtual comments inside of modules aren't members of modules. 2014-04-13 20:28:20 -04:00
Jeff Williams
6480b96e7e log a warning if the type tag has a description (#615)
adds a `mustNotHaveDescription` property for tag definitions
2014-04-13 08:12:09 -07:00
Jeff Williams
3b45503625 log a warning if a tag has an extraneous value (#632) 2014-04-13 07:26:11 -07:00
Jeff Williams
b7782fc151 Merge pull request #617 from cdparks/fix-excludes
Fix for #616, making excluded-filepaths play nicely with -r
2014-04-09 16:52:32 -07:00
jeffwi
933db9f032 handle Esprima parse errors more gracefully (#625) 2014-04-09 16:50:47 -07:00
Christopher D. Parks
40d5a352bb Adding test for fix
Without the fix, we get the following when running ./jsdoc -T:
    Failures:

    jsdoc/src/filter Filter isIncluded

      1) should be able to exclude descendants of excluded subdirectories
      Message:
        Expected 4 to be 2.
      Stacktrace:
        undefined

      2) should be able to exclude descendants of excluded subdirectories
      Message:
        Expected 1 to be -1.
      Stacktrace:
        undefined

      3) should be able to exclude descendants of excluded subdirectories
      Message:
        Expected 3 to be -1.
      Stacktrace:
        undefined

    Finished in 6.696 seconds
    849 tests, 2050 assertions, 3 failures

This test passes with the fix.
2014-04-07 10:44:21 -07:00
Jeff Williams
62406412b6 walk children of ES6 nodes (#555)
For now, the node visitor discards these and logs a warning.
2014-04-07 08:47:51 -07:00
Jeff Williams
3e4e48accd attach inline type annotations to function params (#611)
includes a new Rhino jar: jsdoc3/rhino@bb2446ad
2014-03-30 22:01:04 -07:00
Jeff Williams
8df4472a2d set the correct longname when the doclet's name starts with the namespace's name (#608)
plus some cleanup
2014-03-27 15:12:24 -07:00
Jeff Williams
463065d996 clean up tests 2014-03-18 22:02:58 -07:00
Jeff Williams
8128dc5335 handle default values that are array literals (#604)
plus some test cleanup
2014-03-18 10:16:41 -07:00
Jeff Williams
cd6c89ec10 re-enable default values that are object literals (#607) 2014-03-18 10:00:16 -07:00
Jeff Williams
3b5db81d92 fix closures with multiple lends tags (#569)
There were three separate problems here:

1. The visitor called `trackVars` at the wrong time for `AssignmentExpression` and `VariableDeclarator` nodes, which prevented JSDoc from setting the `funcscope` property correctly.
2. The `funcscope` property was being added to `VariableDeclarator` nodes. It should only be added to `AssignmentExpression` nodes.
3. We were trying to resolve the variable name `____` in `AssignmentExpression` nodes. This is a special value we add to the source code so that the `lends` tag will work, and it should never be resolved against the enclosing scope.

The previous, buggy behavior looked reasonable in most cases, but it didn't work for closures that contain multiple `lends` tags.
2014-03-16 19:58:34 -07:00
Jeff Williams
49ad746e49 trailing whitespace cleanup 2014-03-04 13:47:57 -08:00
Jeff Williams
dd27185ad9 fix issues with doclet names that are filepaths (#590)
Prior to this fix, if a file was outside of the JSDoc
directory, and your code included something like a
`@file` tag, we would set the doclet's name to the
entire filepath instead of the shortened filepath.

With this fix, we set the name to the shortened
filepath.
2014-03-04 12:31:09 -08:00
Jeff Williams
48e6c392d5 huge whitespace cleanup
- remove all trailing whitespace
- for consistency, replace all tabs with spaces
2014-03-03 07:43:01 -08:00
Jeff Williams
ab9ca215a1 exclude subdirectories of included directories (#484) 2014-03-02 16:30:30 -08:00
Jeff Williams
e095462a57 delint 2014-03-02 16:13:59 -08:00
Jeff Williams
60c7c8a606 add debugging properties to AST nodes (#589) 2014-02-26 08:31:53 -08:00
Jeff Williams
2442df893d allow newDoclet event handlers to modify doclets (#584) 2014-02-23 20:34:38 -08:00
Jeff Williams
4e3e4a0151 fix lends tag inside nested function calls (#565)
plus some minor test cleanup
2014-02-23 20:16:16 -08:00
Jeff Williams
ec93145550 fix the lends tag inside of closures (#573) 2014-02-23 09:36:59 -08:00
Jeff Williams
34d98ed438 add @also to tag definitions (#574)
This tag is used internally. It previously caused
"not a known tag" errors when
tags.allowUnknownTags was set to false.
2014-02-16 08:39:32 -08:00
Jeff Williams
3ae23b8b21 provide a setter for doclet scope (#574)
We previously set the doclet's scope by adding a
`@scope` tag, which, in turn, was used to update
the scope. Since this tag isn't defined or used in
any other context, it could cause "not a known
tag" errors.
2014-02-16 07:44:28 -08:00
Jeff Williams
43b6920085 document new properties on module.exports (#500) 2014-02-01 20:12:24 -08:00
Jeff Williams
6d83ffd060 the common prefix for one file is the file's dirname (#553) 2013-12-26 21:19:37 -08:00