From f09b6114e90f8c7a0c8a31ca7f3823328062d3e1 Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Mon, 24 Nov 2025 14:52:18 +0100 Subject: [PATCH 1/3] Lead with repository failure and continue with suggestion. --- lib/src/report/template.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/report/template.dart b/lib/src/report/template.dart index 30bcebd37..51a2e25d4 100644 --- a/lib/src/report/template.dart +++ b/lib/src/report/template.dart @@ -200,13 +200,13 @@ Future followsTemplate(PackageContext context) async { Issue( 'Failed to verify repository URL.', suggestion: + '*${repository.verificationFailure ?? 'See logs for further details.'}*\n\n' 'Please provide a valid [`repository`](https://dart.dev/tools/pub/pubspec#repository) URL in `pubspec.yaml`, such that:\n\n' ' * `repository` can be cloned,\n' ' * a clone of the repository contains a `pubspec.yaml`, which:,\n' ' * contains `name: ${pubspec.name}`,\n' ' * contains a `version` property, and,\n' - ' * does not contain a `publish_to` property.\n\n' - '${repository.verificationFailure ?? 'status: `${repositoryStatus.name}`'}', + ' * does not contain a `publish_to` property.', ), ); } From aa4c493a773140a1e696322114e88f83ab91aa1f Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Mon, 24 Nov 2025 15:15:22 +0100 Subject: [PATCH 2/3] goldens --- test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json | 2 +- .../end2end/_dummy_pkg-1.0.0-null-safety.1.json_report.md | 4 ++-- test/goldens/end2end/onepub-1.1.0.json | 2 +- test/goldens/end2end/onepub-1.1.0.json_report.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json b/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json index e0770c58a..9d49c7aef 100644 --- a/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json +++ b/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json @@ -31,7 +31,7 @@ "grantedPoints": 15, "maxPoints": 30, "status": "failed", - "summary": "### [x] 0/10 points: Provide a valid `pubspec.yaml`\n\n
\n\nSdk-constraint doesn't allow future stable dart 2.x releases\n\n\n`pubspec.yaml:6:8`\n\n```\n ╷\n6 │ sdk: \">=2.12.0-0 <2.12.0\"\n │ ^^^^^^^^^^^^^^^^^^^^\n ╵\n```\n\n
\n\n
\n\nFailed to verify repository URL.\n\n\nPlease provide a valid [`repository`](https://dart.dev/tools/pub/pubspec#repository) URL in `pubspec.yaml`, such that:\n\n * `repository` can be cloned,\n * a clone of the repository contains a `pubspec.yaml`, which:,\n * contains `name: _dummy_pkg`,\n * contains a `version` property, and,\n * does not contain a `publish_to` property.\n\n`pkg/pub_integration/test_data/_dummy_pkg/pubspec.yaml` from the repository has no `version`.\n
\n\n### [*] 5/5 points: Provide a valid `README.md`\n\n### [x] 0/5 points: Provide a valid `CHANGELOG.md`\n\n
\n\nNo `CHANGELOG.md` found.\n\n\nChangelog entries help developers follow the progress of your package. Check out the Dart conventions for [Maintaining a package changelog](https://dart.dev/tools/pub/package-layout#changelog).\n
\n\n### [*] 10/10 points: Use an OSI-approved license\n\nDetected license: `BSD-3-Clause`.\n" + "summary": "### [x] 0/10 points: Provide a valid `pubspec.yaml`\n\n
\n\nSdk-constraint doesn't allow future stable dart 2.x releases\n\n\n`pubspec.yaml:6:8`\n\n```\n ╷\n6 │ sdk: \">=2.12.0-0 <2.12.0\"\n │ ^^^^^^^^^^^^^^^^^^^^\n ╵\n```\n\n
\n\n
\n\nFailed to verify repository URL.\n\n\n*`pkg/pub_integration/test_data/_dummy_pkg/pubspec.yaml` from the repository has no `version`.*\n\nPlease provide a valid [`repository`](https://dart.dev/tools/pub/pubspec#repository) URL in `pubspec.yaml`, such that:\n\n * `repository` can be cloned,\n * a clone of the repository contains a `pubspec.yaml`, which:,\n * contains `name: _dummy_pkg`,\n * contains a `version` property, and,\n * does not contain a `publish_to` property.\n
\n\n### [*] 5/5 points: Provide a valid `README.md`\n\n### [x] 0/5 points: Provide a valid `CHANGELOG.md`\n\n
\n\nNo `CHANGELOG.md` found.\n\n\nChangelog entries help developers follow the progress of your package. Check out the Dart conventions for [Maintaining a package changelog](https://dart.dev/tools/pub/package-layout#changelog).\n
\n\n### [*] 10/10 points: Use an OSI-approved license\n\nDetected license: `BSD-3-Clause`.\n" }, { "id": "documentation", diff --git a/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json_report.md b/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json_report.md index 92c6460bb..1f3af0fcc 100644 --- a/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json_report.md +++ b/test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json_report.md @@ -23,6 +23,8 @@ Sdk-constraint doesn't allow future stable dart 2.x releases Failed to verify repository URL. +*`pkg/pub_integration/test_data/_dummy_pkg/pubspec.yaml` from the repository has no `version`.* + Please provide a valid [`repository`](https://dart.dev/tools/pub/pubspec#repository) URL in `pubspec.yaml`, such that: * `repository` can be cloned, @@ -30,8 +32,6 @@ Please provide a valid [`repository`](https://dart.dev/tools/pub/pubspec#reposit * contains `name: _dummy_pkg`, * contains a `version` property, and, * does not contain a `publish_to` property. - -`pkg/pub_integration/test_data/_dummy_pkg/pubspec.yaml` from the repository has no `version`. ### [*] 5/5 points: Provide a valid `README.md` diff --git a/test/goldens/end2end/onepub-1.1.0.json b/test/goldens/end2end/onepub-1.1.0.json index 20ec046f8..db1c9d484 100644 --- a/test/goldens/end2end/onepub-1.1.0.json +++ b/test/goldens/end2end/onepub-1.1.0.json @@ -120,7 +120,7 @@ "grantedPoints": 10, "maxPoints": 30, "status": "failed", - "summary": "### [x] 0/10 points: Provide a valid `pubspec.yaml`\n\n
\n\nFailed to verify repository URL.\n\n\nPlease provide a valid [`repository`](https://dart.dev/tools/pub/pubspec#repository) URL in `pubspec.yaml`, such that:\n\n * `repository` can be cloned,\n * a clone of the repository contains a `pubspec.yaml`, which:,\n * contains `name: onepub`,\n * contains a `version` property, and,\n * does not contain a `publish_to` property.\n\n`pubspec.yaml` from the repository URL mismatch: expected `https://github.com/noojee/onepub.dev` but got `https://github.com/onepub-dev/onepub`.\n
\n\n### [*] 5/5 points: Provide a valid `README.md`\n\n### [*] 5/5 points: Provide a valid `CHANGELOG.md`\n\n### [x] 0/10 points: Use an OSI-approved license\n\n
\n\nNo license was recognized.\n\n\nConsider using an [OSI-approved license](https://opensource.org/licenses) in the `LICENSE` file to make it more accessible to the community.\n
\n" + "summary": "### [x] 0/10 points: Provide a valid `pubspec.yaml`\n\n
\n\nFailed to verify repository URL.\n\n\n*`pubspec.yaml` from the repository URL mismatch: expected `https://github.com/noojee/onepub.dev` but got `https://github.com/onepub-dev/onepub`.*\n\nPlease provide a valid [`repository`](https://dart.dev/tools/pub/pubspec#repository) URL in `pubspec.yaml`, such that:\n\n * `repository` can be cloned,\n * a clone of the repository contains a `pubspec.yaml`, which:,\n * contains `name: onepub`,\n * contains a `version` property, and,\n * does not contain a `publish_to` property.\n
\n\n### [*] 5/5 points: Provide a valid `README.md`\n\n### [*] 5/5 points: Provide a valid `CHANGELOG.md`\n\n### [x] 0/10 points: Use an OSI-approved license\n\n
\n\nNo license was recognized.\n\n\nConsider using an [OSI-approved license](https://opensource.org/licenses) in the `LICENSE` file to make it more accessible to the community.\n
\n" }, { "id": "documentation", diff --git a/test/goldens/end2end/onepub-1.1.0.json_report.md b/test/goldens/end2end/onepub-1.1.0.json_report.md index 5d8626974..b70aaf3cd 100644 --- a/test/goldens/end2end/onepub-1.1.0.json_report.md +++ b/test/goldens/end2end/onepub-1.1.0.json_report.md @@ -7,6 +7,8 @@ Failed to verify repository URL. +*`pubspec.yaml` from the repository URL mismatch: expected `https://github.com/noojee/onepub.dev` but got `https://github.com/onepub-dev/onepub`.* + Please provide a valid [`repository`](https://dart.dev/tools/pub/pubspec#repository) URL in `pubspec.yaml`, such that: * `repository` can be cloned, @@ -14,8 +16,6 @@ Please provide a valid [`repository`](https://dart.dev/tools/pub/pubspec#reposit * contains `name: onepub`, * contains a `version` property, and, * does not contain a `publish_to` property. - -`pubspec.yaml` from the repository URL mismatch: expected `https://github.com/noojee/onepub.dev` but got `https://github.com/onepub-dev/onepub`. ### [*] 5/5 points: Provide a valid `README.md` From fc6b0f1c00aa68323e4e836d1834dbd874bdb05c Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Mon, 24 Nov 2025 15:27:08 +0100 Subject: [PATCH 3/3] Bump async version in end2end test. --- test/end2end_test.dart | 2 +- .../{async-2.11.0.json => async-2.13.0.json} | 44 +++++++++++-------- ..._report.md => async-2.13.0.json_report.md} | 23 ++-------- 3 files changed, 29 insertions(+), 40 deletions(-) rename test/goldens/end2end/{async-2.11.0.json => async-2.13.0.json} (78%) rename test/goldens/end2end/{async-2.11.0.json_report.md => async-2.13.0.json_report.md} (79%) diff --git a/test/end2end_test.dart b/test/end2end_test.dart index fccd68e31..944d0daf7 100644 --- a/test/end2end_test.dart +++ b/test/end2end_test.dart @@ -199,7 +199,7 @@ void main() { } // generic, cross-platform package - verifyPackage('async', '2.11.0'); + verifyPackage('async', '2.13.0'); // cross-platform package with platform-specific code verifyPackage('http', '0.13.0', skipDartdoc: true); diff --git a/test/goldens/end2end/async-2.11.0.json b/test/goldens/end2end/async-2.13.0.json similarity index 78% rename from test/goldens/end2end/async-2.11.0.json rename to test/goldens/end2end/async-2.13.0.json index a053bc175..3969367a6 100644 --- a/test/goldens/end2end/async-2.11.0.json +++ b/test/goldens/end2end/async-2.13.0.json @@ -6,30 +6,34 @@ "flutterVersions": {} }, "packageName": "async", - "packageVersion": "2.11.0", + "packageVersion": "2.13.0", "pubspec": { "name": "async", - "version": "2.11.0", + "version": "2.13.0", "description": "Utility functions and classes related to the 'dart:async' library.", - "repository": "https://github.com/dart-lang/async", + "repository": "https://github.com/dart-lang/core/tree/main/pkgs/async", + "issue_tracker": "https://github.com/dart-lang/core/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aasync", + "topics": [ + "async" + ], "environment": { - "sdk": ">=2.18.0 <3.0.0" + "sdk": "^3.4.0" }, "dependencies": { "collection": "^1.15.0", - "meta": "^1.1.7" + "meta": "^1.3.0" }, "dev_dependencies": { + "dart_flutter_team_lints": "^3.0.0", "fake_async": "^1.2.0", - "lints": "^2.0.0", "stack_trace": "^1.10.0", - "test": "^1.16.0" + "test": "^1.16.6" } }, "allDependencies": [ "collection", + "dart_flutter_team_lints", "fake_async", - "lints", "meta", "stack_trace", "test" @@ -51,7 +55,8 @@ "is:dart3-compatible", "license:bsd-3-clause", "license:fsf-libre", - "license:osi-approved" + "license:osi-approved", + "topic:async" ], "report": { "sections": [ @@ -82,10 +87,10 @@ { "id": "analysis", "title": "Pass static analysis", - "grantedPoints": 40, + "grantedPoints": 50, "maxPoints": 50, - "status": "partial", - "summary": "### [~] 40/50 points: code has no errors, warnings, lints, or formatting issues\n\n
\n\nINFO: 'whereNotNull' is deprecated and shouldn't be used. Use .nonNulls instead.\n\n\n`lib/src/stream_group.dart:242:10`\n\n```\n ╷\n242 │ .whereNotNull()\n │ ^^^^^^^^^^^^\n ╵\n```\n\nTo reproduce make sure you are using the [lints_core](https://pub.dev/packages/lints) and run `dart analyze lib/src/stream_group.dart`\n
\n" + "status": "passed", + "summary": "### [*] 50/50 points: code has no errors, warnings, lints, or formatting issues\n" }, { "id": "dependency", @@ -93,22 +98,23 @@ "grantedPoints": 40, "maxPoints": 40, "status": "passed", - "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\n|Package|Constraint|Compatible|Latest|Notes|\n|:-|:-|:-|:-|:-|\n|[`collection`]|`^1.15.0`|1.19.1|1.19.1||\n|[`meta`]|`^1.1.7`|1.17.0|1.17.0||\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n[`collection`]: https://pub.dev/packages/collection\n[`meta`]: https://pub.dev/packages/meta\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n\n### [*] 20/20 points: Compatible with dependency constraint lower bounds\n\n`pub downgrade` does not expose any static analysis error.\n" + "summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\n|Package|Constraint|Compatible|Latest|Notes|\n|:-|:-|:-|:-|:-|\n|[`collection`]|`^1.15.0`|1.19.1|1.19.1||\n|[`meta`]|`^1.3.0`|1.17.0|1.17.0||\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n[`collection`]: https://pub.dev/packages/collection\n[`meta`]: https://pub.dev/packages/meta\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n\n### [*] 20/20 points: Compatible with dependency constraint lower bounds\n\n`pub downgrade` does not expose any static analysis error.\n" } ] }, "screenshots": [], "result": { - "repositoryUrl": "https://github.com/dart-lang/async", - "issueTrackerUrl": "https://github.com/dart-lang/async/issues", + "repositoryUrl": "https://github.com/dart-lang/core/tree/main/pkgs/async", + "issueTrackerUrl": "https://github.com/dart-lang/core/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aasync", "repositoryStatus": "verified", "repository": { "provider": "github", "host": "github.com", - "repository": "dart-lang/async", - "branch": "master" + "repository": "dart-lang/core", + "branch": "main", + "path": "pkgs/async" }, - "contributingUrl": "https://github.com/dart-lang/async/blob/master/CONTRIBUTING.md", + "contributingUrl": "https://github.com/dart-lang/core/blob/main/CONTRIBUTING.md", "licenses": [ { "spdxIdentifier": "BSD-3-Clause", @@ -133,7 +139,7 @@ ] } ], - "grantedPoints": 140, + "grantedPoints": 150, "maxPoints": 160 }, "urlProblems": [] diff --git a/test/goldens/end2end/async-2.11.0.json_report.md b/test/goldens/end2end/async-2.13.0.json_report.md similarity index 79% rename from test/goldens/end2end/async-2.11.0.json_report.md rename to test/goldens/end2end/async-2.13.0.json_report.md index 0da2de77f..7353c139f 100644 --- a/test/goldens/end2end/async-2.11.0.json_report.md +++ b/test/goldens/end2end/async-2.13.0.json_report.md @@ -53,26 +53,9 @@ This package is compatible with runtime `wasm`, and will be rewarded additional See https://dart.dev/web/wasm for details. -## 40/50 Pass static analysis +## 50/50 Pass static analysis -### [~] 40/50 points: code has no errors, warnings, lints, or formatting issues - -
- -INFO: 'whereNotNull' is deprecated and shouldn't be used. Use .nonNulls instead. - - -`lib/src/stream_group.dart:242:10` - -``` - ╷ -242 │ .whereNotNull() - │ ^^^^^^^^^^^^ - ╵ -``` - -To reproduce make sure you are using the [lints_core](https://pub.dev/packages/lints) and run `dart analyze lib/src/stream_group.dart` -
+### [*] 50/50 points: code has no errors, warnings, lints, or formatting issues ## 40/40 Support up-to-date dependencies @@ -82,7 +65,7 @@ To reproduce make sure you are using the [lints_core](https://pub.dev/packages/l |Package|Constraint|Compatible|Latest|Notes| |:-|:-|:-|:-|:-| |[`collection`]|`^1.15.0`|1.19.1|1.19.1|| -|[`meta`]|`^1.1.7`|1.17.0|1.17.0|| +|[`meta`]|`^1.3.0`|1.17.0|1.17.0|| To reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.