Repository navigation
Fix exit code of an unknown command and the model doc comment - #13
Merged
Merged
Conversation
An unknown command in an app with package commands exited with 0. The runner now sets exit code 1. An old runner file is written again when its text is not the same as the new one. The make:model stub had <String>[...] in a doc comment, which gave the analyzer info unintended_html_in_doc_comment. It is now in backticks.
Contributor
Author
Bot reviewVerdict: no blocking problems. What I checked:
Nits (not blocking):
|
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.
Problem 1: unknown command exits with 0
In an app with package commands (like an app with dox_queue),
dox nope:cmdprints "Could not find a command" but exits with 0. So scripts and CI think the command worked.The cause: the runner file
.dart_tool/dox/commands.dartreturned with exit code 0 when no package had the command.Fix: the runner now sets exit code 1. The message stays on stdout, the same as the other error messages of the CLI. The runner file was only written again when the packages changed. Now it is also written again when its text is not the same as the new one, so old apps get the fix too.
Problem 2: analyzer info in the new model
dox make:modelwrote a doc comment with<String>['title', 'body']. The analyzer shows the infounintended_html_in_doc_commentfor it.Fix: the code is now in backticks. No other
make:*stub had this problem.Tests
make:*generator and checks that no doc comment has<...>outside backticks.dart analyze --fatal-infos,dart formatanddart test(142 tests) pass.