Skip to content

Commit

Permalink
remove package:github dependent code
Browse files Browse the repository at this point in the history
  • Loading branch information
pq committed Jul 18, 2023
1 parent fdab810 commit d8b18e8
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 269 deletions.
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ dependencies:
dev_dependencies:
benchmark_harness: ^2.0.0
cli_util: ^0.4.0
github: ^9.0.0
lints: ^2.0.0
markdown: ^7.0.0
matcher: ^0.12.10
Expand Down
64 changes: 0 additions & 64 deletions tool/canonical/gh_labels.dart

This file was deleted.

18 changes: 0 additions & 18 deletions tool/canonical/scorecard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import 'package:analyzer/dart/ast/visitor.dart';
import 'package:analyzer/src/lint/config.dart'; // ignore: implementation_imports
import 'package:analyzer/src/lint/registry.dart'; // ignore: implementation_imports
import 'package:analyzer/src/lint/state.dart'; // ignore: implementation_imports
import 'package:github/github.dart';
import 'package:http/http.dart' as http;
import 'package:linter/src/analyzer.dart';
import 'package:linter/src/rules.dart';
Expand Down Expand Up @@ -139,7 +138,6 @@ class Detail {
static const Detail fix = Detail('fix');
static const Detail bulk = Detail('bulk');
static const Detail status = Detail('status');
static const Detail bugs = Detail('bug refs', header: Header.left);
final String name;
final Header header;
const Detail(this.name, {this.header = Header.center});
Expand All @@ -161,7 +159,6 @@ class LintScore {
State state;

List<String> ruleSets;
List<String> bugReferences;

LintScore({
required this.name,
Expand All @@ -170,7 +167,6 @@ class LintScore {
required this.hasBulkFix,
required this.state,
required this.ruleSets,
required this.bugReferences,
});

bool get inCore => ruleSets.contains('core');
Expand Down Expand Up @@ -198,8 +194,6 @@ class LintScore {
sb.write(' $status |');
case Detail.status:
sb.write('${!state.isStable ? ' **${state.label}** ' : ""} |');
case Detail.bugs:
sb.write(' ${bugReferences.join(", ")} |');
}
}
return sb.toString();
Expand Down Expand Up @@ -267,9 +261,6 @@ class ScoreCard {
var lintsWithAssists = _getLintsWithAssists();
var lintsWithFixes = await _getLintsWithFixes();
var lintsWithBulkFixes = await _getLintsWithBulkFixes();
// var issues = await _getIssues();
// var bugs = issues.where(_isBug).toList();
var bugs = <Issue>[];

var coreRuleset = await _readCoreLints();
var recommendedRuleset = await _readRecommendedLints();
Expand All @@ -292,14 +283,6 @@ class ScoreCard {
continue;
}

var bugReferences = <String>[];
for (var bug in bugs) {
var title = bug.title;
if (title.contains(lint.name)) {
bugReferences.add('#${bug.number}');
}
}

var lintName = lint.name;
scorecard.add(LintScore(
name: lintName,
Expand All @@ -308,7 +291,6 @@ class ScoreCard {
hasBulkFix: lintsWithBulkFixes.contains(lintName),
state: lint.state,
ruleSets: ruleSets,
bugReferences: bugReferences,
));
}

Expand Down
55 changes: 0 additions & 55 deletions tool/gh/get_labels.dart

This file was deleted.

38 changes: 0 additions & 38 deletions tool/github.dart

This file was deleted.

72 changes: 0 additions & 72 deletions tool/query.dart

This file was deleted.

Loading

0 comments on commit d8b18e8

Please sign in to comment.