-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Output validation errors on stdout, slightly prettier formatted (#4424)
- Loading branch information
Showing
17 changed files
with
162 additions
and
75 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
65 changes: 65 additions & 0 deletions
65
test/testdata/goldens/validator/validations_output_test/Layout of publication warnings.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# GENERATED BY: test/validator/validations_output_test.dart | ||
|
||
## Section 0 | ||
$ pub publish --dry-run | ||
Resolving dependencies... | ||
Downloading packages... | ||
! bar 1.0.0 (overridden) | ||
+ foo 1.0.0 | ||
Changed 1 dependency! | ||
Publishing myapp 0.0.0 to http://localhost:$PORT: | ||
├── bin | ||
│ └── main.dart (<1 KB) | ||
└── pubspec.yaml (<1 KB) | ||
|
||
Total compressed archive size: <1 KB. | ||
Validating package... | ||
Package validation found the following 4 errors: | ||
* You must have a LICENSE file in the root directory. | ||
An open-source license helps ensure people can legally use your code. | ||
|
||
* Your pubspec.yaml is missing a "description" field. | ||
|
||
* Your pubspec.yaml is missing a "version" field. | ||
|
||
* line 1, column 1 of bin/main.dart: foo is in the `dev_dependencies` section of `pubspec.yaml`. Packages used in bin/ must be declared in the `dependencies` section. | ||
╷ | ||
1 │ import 'package:foo/foo.dart'; | ||
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
╵ | ||
|
||
Package validation found the following 5 potential issues: | ||
* `dart analyze` found the following issue(s): | ||
Analyzing bin, pubspec.yaml... | ||
|
||
warning - bin/main.dart:1:8 - Unused import: 'package:foo/foo.dart'. Try removing the import directive. - unused_import | ||
|
||
1 issue found. | ||
|
||
|
||
* It's strongly recommended to include a "homepage" or "repository" field in your pubspec.yaml | ||
|
||
* Your dependency on "bar" should have a version constraint. For example: | ||
|
||
dependencies: | ||
bar: ^1.0.0 | ||
|
||
Without a constraint, you're promising to support all future versions of "bar". | ||
|
||
* Please add a README.md file that describes your package. | ||
|
||
* Please add a `CHANGELOG.md` to your package. See https://dart.dev/tools/pub/publishing#important-files. | ||
|
||
Package validation found the following hint: | ||
* Non-dev dependencies are overridden in pubspec.yaml. | ||
|
||
This indicates you are not testing your package against the same versions of its | ||
dependencies that users will have when they use it. | ||
|
||
This might be necessary for packages with cyclic dependencies. | ||
|
||
Please be extra careful when publishing. | ||
[STDERR] Sorry, your package is missing some requirements and can't be published yet. | ||
[STDERR] For more information, see: https://dart.dev/tools/pub/cmd/pub-lish. | ||
[EXIT CODE] 65 | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.