Merge pull request #1076 from tree-sitter/cli-match-limit-warning

cli: Warn about queries that exceed match limit
This commit is contained in:
Douglas Creager 2021-04-28 15:37:43 -04:00 committed by GitHub
commit 108679ffdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,6 +91,12 @@ pub fn query_files_at_paths(
}
}
}
if query_cursor.did_exceed_match_limit() {
writeln!(
&mut stdout,
" WARNING: Query exceeded maximum number of in-progress captures!"
)?;
}
if should_test {
query_testing::assert_expected_captures(results, path, &mut parser, language)?
}