Skip to content

Commit

Permalink
linter: Simplify lint rule selection
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
srawlins authored and Commit Queue committed Jan 15, 2025
1 parent 91e7d23 commit 927769e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/linter/tool/checks/driver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ class Driver {
(context as DriverBasedAnalysisContext).allAnalysisOptions;
for (var options in allOptions) {
options as AnalysisOptionsImpl;
options.lintRules = options.lintRules.toList();
lints.forEach(options.lintRules.add);
options.lintRules = [...options.lintRules, ...lints];
options.lint = true;
}

Expand Down

0 comments on commit 927769e

Please sign in to comment.