Skip to content

Running with --dry-run masks warnings from --validate-links #3330

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

Closed
Tracked by #50973
mkorbel1 opened this issue Feb 10, 2023 · 7 comments
Closed
Tracked by #50973

Running with --dry-run masks warnings from --validate-links #3330

mkorbel1 opened this issue Feb 10, 2023 · 7 comments
Assignees
Labels
P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@mkorbel1
Copy link

Running dart doc --validate-links --dry-run when warnings related to --validate-links are present will mask those warnings. They are only visible if --dry-run is omitted.

Additionally, I can't get any of the --validate-links warnings to print out, just the count of the number of warnings, which is pretty frustrating to debug. I'm not sure if the two are related.

Running on Dart version 2.19.2:

$ dart --version
Dart SDK version: 2.19.2 (stable) (Unknown timestamp) on "linux_x64"
@srawlins
Copy link
Member

Good catch. That combo of flags should not be allowed.

@srawlins srawlins added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) P3 A lower priority bug or feature request labels Feb 10, 2023
@srawlins
Copy link
Member

Additionally, I can't get any of the --validate-links warnings to print out

Would you mind filing a separate issue for this? Thanks!

@mkorbel1
Copy link
Author

That combo of flags should not be allowed.

Why not? My use case is checking that there's no documentation issues as part of CI. I'd like to include warnings caught by --validate-links in my CI, but without actually needing to generate (and keep) all the documentation lying around.

Speaking of, these other issues are relevant for this use case as well:
#2846
#2907
#1959

Would you mind filing a separate issue for this? Thanks!

Sure, filed here: #3331

@srawlins
Copy link
Member

The --validate-links feature is just a generic links checker on the generated output. If you like, we could keep this as a feature request that links can be validated in a dry run. But I'll prepare you I don't think we can implement that in the foreseeable future.

@mkorbel1
Copy link
Author

Ah, ok, thanks for clarifying. I guess my real "feature request" is to make it really easy to use dartdoc in CI with as many quality checks as possible.

Ignoring/deleting the doc/api/ directory feels like an acceptable workaround for now, but yes some sort of indication that you can't run those two flags together would be helpful!

@jcollins-g jcollins-g self-assigned this Feb 13, 2023
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Feb 14, 2023
Bug: dart-lang/dartdoc#3330
Change-Id: I6a40317c6bab90aa4126b92dbe1a852e3f946b29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282811
Commit-Queue: Janice Collins <[email protected]>
Reviewed-by: Samuel Rawlins <[email protected]>
@jcollins-g
Copy link
Contributor

https://dart-review.googlesource.com/c/sdk/+/282811 should prevent users from using both flags at once under this circumstance.

@mit-mit
Copy link
Member

mit-mit commented Apr 17, 2023

@jcollins-g given this is technically a small breaking change (CI jobs that used to pass both flags will break), I think we should mention this in the CHANGELOG.md file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants