Open myphysicslab opened 7 years ago
re: exclusions, there's likely a bug where using closureLibraryDir ignores the exclusion list. I'll take a look.
re: HtmlSanitizer, these warnings are caused by poorly formatted jsdoc comments. For example:
/**
* Create a <div> tag
*/
In that comment, <div>
is parsed as raw HTML. If the raw HTML includes things HtmlSanitizer doesn't like (e.g. <label>
in your example), it will scrub them out. You can either fix them by adding back-ticks to create an inline code block:
/**
* Create a `<div>` tag
*/
Or use {@code }
(as you would in javadoc):
/**
* Create a {@code <div>} tag
*/
Thanks, both the backticks and the {@code }
are working. (I didn't realize backtick is an option, and I was incorrectly using @code{ }
instead of {@code }
).
It looks like the "Ignoring undeclared namespace" errors happen because there are lots of globals being defined in goog.testing
without any type information. So being able to exclude at least that directory would probably be the best way to deal with it.
Getting errors from closure-library when building docs with Dossier, but I don't know how to fix the errors. I'm able to build my docs, these are all warnings, but it is distracting to have so many warnings (which can obscure warnings I might care about).
There are two classes of errors.
goog.testing
).com.github.jsdossier.soy.HtmlSanitizer
.For the "Discard tag" warnings, I've tried using
@code
tags, but then closure-compiler complains about the@code
tag withPerhaps using
--extra_annotation_name
option (whitelist of tag names in JSDoc) with closure-compiler would solve that, but I don't know how to add this to Dossier. These warnings seem to all be from the docs forgoog.html.TrustedResourceUrl.format
.I've been unable to exclude documenting closure-library files. However I am able to exclude other files. I've tried using the
excludes
option inconfig.json
without success. Here is myconfig.json
:I've tried other variations like
"closure-library"
or"closure-library/closure/goog"
or"closure-library/closure/goog/*"
or "closure/goog
" without success. Note thatclosure-library
is a symbolic link in the directory where I am building. With my directory set to where I am building the docs I am able to list theclosure-library
files, for example:Here are all of the first type of error and a sample of the second type.
Sample of the second type of error:
In case it is helpful: all of my source code is now online and fairly easy to build. See https://github.com/myphysicslab/myphysicslab.