Skip to content

Commit 377779d

Browse files
committed
fix tests
1 parent c95eb6a commit 377779d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cpp-linter/src/rest_api/github/specific_api.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,8 @@ impl GithubApiClient {
371371
let mut payload = FullReview {
372372
event: if feedback_input.passive_reviews {
373373
String::from("COMMENT")
374-
} else if has_no_changes {
374+
} else if has_no_changes && review_comments.comments.is_empty() {
375+
// if patches have no changes AND there are no comments about clang-tidy diagnostics
375376
String::from("APPROVE")
376377
} else {
377378
String::from("REQUEST_CHANGES")

cpp-linter/tests/reviews.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ async fn setup(lib_root: &Path, test_params: &TestParams) {
204204
);
205205
}
206206

207-
let tool_ignore = "**/*.c".to_string();
207+
let mut tool_ignore = "**/*.c".to_string();
208+
if test_params.force_lgtm {
209+
tool_ignore.push_str("|**/*.cpp|**/*.h");
210+
}
208211
let mut args = vec![
209212
"cpp-linter".to_string(),
210213
"-v=debug".to_string(),

0 commit comments

Comments
 (0)