File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,39 @@ entry. Notably, any change that:
8282should have a short entry in the ` CHANGELOG ` . Feel free to bring up any
8383questions in your PR.
8484
85+ ### Benchmarking
86+
87+ Lint rules can be benchmarked with real code on disk. (There is no
88+ micro-benchmarking suite.) Use the ` tool/benchmark.dart ` script to execute one
89+ or more lint rules against a corpus of code. Here are some examples:
90+
91+ Execute all of the lint rules enabled by a specified analysis options file
92+ against all of the code in the specified directory.
93+
94+ ``` none
95+ dart tool/benchmark.dart \
96+ --config $HOME/my/example/analysis_options.yaml \
97+ $HOME/my/example/package
98+ ```
99+
100+ Execute all of the lint rules enabled by a specified analysis options file
101+ against all of the code in the specified file.
102+
103+ ``` none
104+ dart tool/benchmark.dart \
105+ --config $HOME/my/example/analysis_options.yaml \
106+ $HOME/my/example/package/lib/some_file.dart
107+ ```
108+
109+ Execute all of a set of specified lint rules against all of the code in the
110+ specified directory.
111+
112+ ``` none
113+ dart tool/benchmark.dart \
114+ --rules rule_1,rule_2 \
115+ $HOME/my/example/package
116+ ```
117+
85118** Thank you!**
86119
87120### The small print
You can’t perform that action at this time.
0 commit comments