Skip to content

Commit 927769e

Browse files
srawlinsCommit Queue
authored andcommitted
linter: Simplify lint rule selection
Just a little nit; it took me a second to figure out what was going on with the `add` tearoff. Change-Id: I96a59ea9fe513fa28894c0cb41ede7a07dbb18b7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404521 Reviewed-by: Phil Quitslund <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent 91e7d23 commit 927769e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/linter/tool/checks/driver.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ class Driver {
8686
(context as DriverBasedAnalysisContext).allAnalysisOptions;
8787
for (var options in allOptions) {
8888
options as AnalysisOptionsImpl;
89-
options.lintRules = options.lintRules.toList();
90-
lints.forEach(options.lintRules.add);
89+
options.lintRules = [...options.lintRules, ...lints];
9190
options.lint = true;
9291
}
9392

0 commit comments

Comments
 (0)