Skip to content

Commit 7e7da42

Browse files
srawlinsCommit Queue
authored andcommitted
linter: Correct text regarding benchmark script
I was mistaken about what the `config` flag does: the specified options file is only used to exclude lint rules from the list of all registered lint rules. Change-Id: Iacaa7e283e0de33408b1d8aaa43932336a9ae86c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391565 Auto-Submit: Samuel Rawlins <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent e88d3d1 commit 7e7da42

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

pkg/linter/CONTRIBUTING.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,22 +88,26 @@ Lint rules can be benchmarked with real code on disk. (There is no
8888
micro-benchmarking suite.) Use the `tool/benchmark.dart` script to execute one
8989
or more lint rules against a corpus of code. Here are some examples:
9090

91-
Execute all of the lint rules enabled by a specified analysis options file
92-
against all of the code in the specified directory.
91+
Execute all known lint rules against all of the code in a specified
92+
directory.
9393

9494
```none
95-
dart tool/benchmark.dart \
96-
--config $HOME/my/example/analysis_options.yaml \
97-
$HOME/my/example/package
95+
dart tool/benchmark.dart $HOME/my/example/package
96+
```
97+
98+
Execute all known lint rules against all of the code in the specified file.
99+
100+
```none
101+
dart tool/benchmark.dart $HOME/my/example/package/lib/some_file.dart
98102
```
99103

100-
Execute all of the lint rules enabled by a specified analysis options file
101-
against all of the code in the specified file.
104+
Execute all known lint rules except those _explicitly disabled_ by a specified
105+
analysis options file against all of the code in the specified directory.
102106

103107
```none
104108
dart tool/benchmark.dart \
105109
--config $HOME/my/example/analysis_options.yaml \
106-
$HOME/my/example/package/lib/some_file.dart
110+
$HOME/my/example/package
107111
```
108112

109113
Execute all of a set of specified lint rules against all of the code in the

0 commit comments

Comments
 (0)