зеркало из https://github.com/github/codeql.git
Tree sitter extractor: Proper handling of `LGTM_INDEX_FILTERS`
If someone had used `LGTM_INDEX_FILTERS=exclude:**/*\ninclude:*.rb` before, we would have mistakenly excluded all files :| (LGTM_INDEX_FILTERS is a prioritized list where later matches take priority over earlier ones) This change is needed to support adding `exclude:**/*` as the first filter if `paths` include a glob, which currently causes bad behavior in the Python extractor. However, we can first introduce that change once this PR has been merged. I realize this change can cause more folders and files to be traversed (since they are not just skipped with --exclude). We plan to make a better long term fix which should bring back the previous performance.
This commit is contained in:
Родитель
cda2ef4db5
Коммит
54c7c5e8be
|
@ -81,7 +81,7 @@ impl Autobuilder {
|
|||
if let Some(stripped) = line.strip_prefix("include:") {
|
||||
cmd.arg("--also-match=".to_owned() + stripped);
|
||||
} else if let Some(stripped) = line.strip_prefix("exclude:") {
|
||||
cmd.arg("--exclude=".to_owned() + stripped);
|
||||
cmd.arg("--also-match=!".to_owned() + stripped);
|
||||
}
|
||||
}
|
||||
let exit = &cmd.spawn()?.wait()?;
|
||||
|
|
Загрузка…
Ссылка в новой задаче