@@ -23,8 +23,7 @@ const REMAINING_RATE_LIMIT_HEADER: &str = "x-ratelimit-remaining";
2323
2424struct TestParams {
2525 pub lines_changed_only : LinesChangedOnly ,
26- pub tidy_review : bool ,
27- pub format_review : bool ,
26+ pub pr_review : bool ,
2827 pub passive_reviews : bool ,
2928 pub no_lgtm : bool ,
3029 pub force_lgtm : bool ,
@@ -42,8 +41,7 @@ impl Default for TestParams {
4241 fn default ( ) -> Self {
4342 Self {
4443 lines_changed_only : LinesChangedOnly :: On ,
45- tidy_review : true ,
46- format_review : true ,
44+ pr_review : true ,
4745 passive_reviews : false ,
4846 no_lgtm : true ,
4947 force_lgtm : false ,
@@ -175,9 +173,7 @@ async fn setup(lib_root: &Path, tmp_dir: &TempDir, test_params: &TestParams) {
175173 "REQUEST_CHANGES"
176174 } ;
177175 let tool_summary = {
178- if !( test_params. format_review || test_params. tidy_review )
179- || test_params. lines_changed_only == LinesChangedOnly :: On
180- {
176+ if !test_params. pr_review || test_params. lines_changed_only == LinesChangedOnly :: On {
181177 // results can be non-deterministic because different clang-versions output different diagnostic/changes
182178 ".*" // match anything
183179 } else if test_params. force_lgtm {
@@ -226,24 +222,22 @@ async fn setup(lib_root: &Path, tmp_dir: &TempDir, test_params: &TestParams) {
226222 format!( "-l={}" , test_params. lines_changed_only) ,
227223 format!( "--ignore-tidy={}" , tidy_ignore) ,
228224 format!( "--ignore-format={}" , format_ignore) ,
229- format!( "--tidy-review={}" , test_params. tidy_review) ,
230- format!( "--format-review={}" , test_params. format_review) ,
225+ format!( "--pr-review={}" , test_params. pr_review) ,
231226 format!( "--passive-reviews={}" , test_params. passive_reviews) ,
232227 format!( "--no-lgtm={}" , test_params. no_lgtm) ,
233228 "-p=build" . to_string( ) ,
234229 "-i=build" . to_string( ) ,
235230 format!( "--repo-root={}" , tmp_dir. path( ) . to_str( ) . unwrap( ) ) ,
236231 ] ;
237232 if test_params. force_lgtm {
238- if test_params. tidy_review {
233+ if test_params. pr_review {
239234 // only use a check that doesn't trigger concern on test assets
240235 args. push ( "--tidy-checks=-*,bugprone-infinite-loop" . to_string ( ) ) ;
241- }
242- if test_params. format_review {
243236 // explicitly disable formatting using `DisableFormat: true`
244237 args. push ( "--style={DisableFormat: true}" . to_string ( ) ) ;
245238 }
246239 } else {
240+ // use default --tidy-checks value
247241 args. push ( "--style=file" . to_string ( ) ) ; // use .clang-format file
248242 }
249243 match run_main ( args) . await {
@@ -279,26 +273,6 @@ async fn all_lines() {
279273 . await ;
280274}
281275
282- #[ tokio:: test]
283- async fn all_lines_tidy_only ( ) {
284- test_review ( & TestParams {
285- lines_changed_only : LinesChangedOnly :: Off ,
286- format_review : false ,
287- ..Default :: default ( )
288- } )
289- . await ;
290- }
291-
292- #[ tokio:: test]
293- async fn all_lines_format_only ( ) {
294- test_review ( & TestParams {
295- lines_changed_only : LinesChangedOnly :: Off ,
296- tidy_review : false ,
297- ..Default :: default ( )
298- } )
299- . await ;
300- }
301-
302276#[ tokio:: test]
303277async fn changed_lines ( ) {
304278 test_review ( & TestParams :: default ( ) ) . await ;
0 commit comments