-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow fine-grained warning control with flags and dartdoc_options.yaml files #1891
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
The only thing I don't really like is the "warning" terminology itself. It's confusing that something that is an error is referred to as a warning in so many places: there are "error warnings" and "warning warnings". I would have used the word "logging" or "feedback", or something else that doesn't indicate the severity by its name. That could be fixed in another renaming PR though.
Yes, I found myself cringing a bit at that too. I'll see what I can do in a followup. |
Fixes #1343, the last long-running dartdoc P1 bug. Fixes #1412 by squelching warnings irrelevant to the package you're documenting. Fixes #1480 by obsoleting it.
The last part of #1343 is providing a way to control warning displays similar to the analyzer and linter, including allowing for a hard-failure option. This PR does that.
Changes:
--allow-non-local-warnings
. (further tighten warnings to eliminate false positives #1412)--allow-warnings-in-packages
,--allow-errors-in-packages
,--ignore-warnings-in-packages
, and--ignore-errors-in-packages
will allow large, multi-package documentation sets to narrow their field of view. Particularly important for Flutter docs.--errors
,--warnings
, and--ignore
allow direct control of which warnings are handled in what manner.dartdoc_options.yaml
allowserrors
,warnings
, andignore
to be applied to subdirectory trees, so packages can specify what warnings they care about. Command-line arguments supercede these.--show-warnings
command line flag has been removed in favor of the new options. (Put all warnings behind--show-warnings
#1480)Besides the added tests, ran
grind compare-flutter-warnings
to verify that the new warning code does not accidentally drop warnings on the floor or create new ones: