Skip to content

Commit

Permalink
Increase the severity of missing SDK constraint. (dart-lang#419)
Browse files Browse the repository at this point in the history
* Increase the severity of missing SDK constraint.

* dartfmt
  • Loading branch information
isoos authored Sep 28, 2018
1 parent 86dcb16 commit 909f2c7
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.12.5-dev

* Increase the severity of missing SDK constraint.

## 0.12.4

* Documented how scoring works.
Expand Down
4 changes: 2 additions & 2 deletions lib/src/maintenance.dart
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ Future<Maintenance> detectMaintenance(
}

if (!pubspec.hasDartSdkConstraint) {
maintenanceSuggestions.add(new Suggestion.warning(
maintenanceSuggestions.add(new Suggestion.error(
SuggestionCode.pubspecSdkConstraintMissing,
'Add SDK constraint in `pubspec.yaml`.',
'For information about setting SDK constraint, please see '
'[https://www.dartlang.org/tools/pub/pubspec#sdk-constraints](https://www.dartlang.org/tools/pub/pubspec#sdk-constraints).',
score: 5.0));
score: 50.0));
}

if (pubspec.shouldWarnDart2Constraint) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pana
description: Evaluate the health and quality of a Dart package
version: 0.12.4
version: 0.12.5-dev
homepage: https://github.com/dart-lang/pana
author: Dart Team <misc@dartlang.org>

Expand Down
14 changes: 7 additions & 7 deletions test/end2end/skiplist-0.1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@
"isExperimentalVersion": false,
"isPreReleaseVersion": false,
"suggestions": [
{
"code": "pubspec.sdk.missing",
"level": "error",
"title": "Add SDK constraint in `pubspec.yaml`.",
"description": "For information about setting SDK constraint, please see [https://www.dartlang.org/tools/pub/pubspec#sdk-constraints](https://www.dartlang.org/tools/pub/pubspec#sdk-constraints).",
"score": 50.0
},
{
"code": "platform.conflict.inPkg",
"level": "error",
"title": "Fix platform conflicts.",
"description": "Error(s) prevent platform classification:\n\nFix dependencies in `pubspec.yaml`.",
"score": 20.0
},
{
"code": "pubspec.sdk.missing",
"level": "warning",
"title": "Add SDK constraint in `pubspec.yaml`.",
"description": "For information about setting SDK constraint, please see [https://www.dartlang.org/tools/pub/pubspec#sdk-constraints](https://www.dartlang.org/tools/pub/pubspec#sdk-constraints).",
"score": 5.0
},
{
"code": "pubspec.description.tooShort",
"level": "hint",
Expand Down
16 changes: 8 additions & 8 deletions test/maintenance_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ final _withIssuesJson = {
"isPreReleaseVersion": true,
"dartdocSuccessful": false,
"suggestions": [
{
'code': 'pubspec.sdk.missing',
'level': 'error',
'title': 'Add SDK constraint in `pubspec.yaml`.',
'description':
'For information about setting SDK constraint, please see [https://www.dartlang.org/tools/pub/pubspec#sdk-constraints](https://www.dartlang.org/tools/pub/pubspec#sdk-constraints).',
'score': 50.0,
},
{
'code': 'platform.conflict.inPkg',
'level': 'error',
Expand Down Expand Up @@ -78,14 +86,6 @@ final _withIssuesJson = {
'Update the `homepage` property: create a website about the package or use the source repository URL.',
'score': 10.0,
},
{
'code': 'pubspec.sdk.missing',
'level': 'warning',
'title': 'Add SDK constraint in `pubspec.yaml`.',
'description':
'For information about setting SDK constraint, please see [https://www.dartlang.org/tools/pub/pubspec#sdk-constraints](https://www.dartlang.org/tools/pub/pubspec#sdk-constraints).',
'score': 5.0,
},
{
'code': 'example.missing',
'level': 'hint',
Expand Down

0 comments on commit 909f2c7

Please sign in to comment.