Skip to content

Commit

Permalink
add pedantic details to scoring (dart-lang#1883)
Browse files Browse the repository at this point in the history
* add pedantic details to scoring

* new lint + sorting
  • Loading branch information
pq authored Dec 10, 2019
1 parent 923f9c6 commit bf30244
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
7 changes: 7 additions & 0 deletions tool/scorecard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,15 @@ StringBuffer buildFooter(ScoreCard scorecard, List<Detail> details) {
var flutterUserLintCount = 0;
var flutterRepoLintCount = 0;
var fixCount = 0;
var pedanticFixCount = 0;

for (var score in scorecard.scores) {
for (var ruleSet in score.ruleSets) {
if (ruleSet == 'pedantic') {
++pedanticLintCount;
if (score.hasFix) {
++pedanticFixCount;
}
}
if (ruleSet == 'flutter') {
++flutterUserLintCount;
Expand Down Expand Up @@ -98,6 +102,9 @@ StringBuffer buildFooter(ScoreCard scorecard, List<Detail> details) {
breakdowns.write('; ');
}
breakdowns.write('$fixCount w/ fixes');
if (details.contains(Detail.pedantic)) {
breakdowns.write(' ($pedanticFixCount pedantic)');
}

if (breakdowns.isNotEmpty) {
footer.write(': $breakdowns');
Expand Down
6 changes: 6 additions & 0 deletions tool/since/dart_sdk.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2.7.0-dev.2.1 : 0.1.104
2.7.0-dev.2.0 : 0.1.104
2.7.0-dev.1.0 : 0.1.103
2.7.0-dev.0.0 : 0.1.103
2.6.1 : 0.1.101
2.6.0 : 0.1.101
2.6.0-dev.8.2 : 0.1.101
2.6.0-dev.8.1 : 0.1.101
2.6.0-dev.8.0 : 0.1.101
Expand Down
5 changes: 3 additions & 2 deletions tool/since/linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,12 @@ unawaited_futures: 0.1.19
unnecessary_await_in_return: 0.1.73
unnecessary_brace_in_string_interps: 0.1.30
unnecessary_const: 0.1.54
unnecessary_final : 0.1.104
unnecessary_getters_setters: 0.1.1
unnecessary_lambdas: 0.1.30
unnecessary_new: 0.1.54
unnecessary_null_aware_assignments: 0.1.30
unnecessary_null_in_if_null_operators: 0.1.30
unnecessary_getters_setters: 0.1.1
unnecessary_lambdas: 0.1.30
unnecessary_overrides: 0.1.31
unnecessary_parenthesis: 0.1.44
unnecessary_statements: 0.1.36
Expand Down

0 comments on commit bf30244

Please sign in to comment.