Allow fine-grained warning control with flags and dartdoc_options.yaml files#1891
Merged
jcollins-g merged 24 commits intomasterfrom Jan 11, 2019
Merged
Allow fine-grained warning control with flags and dartdoc_options.yaml files#1891jcollins-g merged 24 commits intomasterfrom
jcollins-g merged 24 commits intomasterfrom
Conversation
This was referenced Jan 8, 2019
gspencergoog
approved these changes
Jan 10, 2019
Collaborator
gspencergoog
left a comment
There was a problem hiding this comment.
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.
Contributor
Author
|
Yes, I found myself cringing a bit at that too. I'll see what I can do in a followup. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-packageswill allow large, multi-package documentation sets to narrow their field of view. Particularly important for Flutter docs.--errors,--warnings, and--ignoreallow direct control of which warnings are handled in what manner.dartdoc_options.yamlallowserrors,warnings, andignoreto be applied to subdirectory trees, so packages can specify what warnings they care about. Command-line arguments supercede these.--show-warningscommand 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-warningsto verify that the new warning code does not accidentally drop warnings on the floor or create new ones: