Commit 5fb3644e authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Update traffic annotation auditor.

Fix traffic annotation auditor bug, when no path filter was provided and
--no-filtering switch was passed, no file was processed.

Bug: 690323
Change-Id: I0235a4c30cf985cf68d7f05080c64bc26f4a29d8
Reviewed-on: https://chromium-review.googlesource.com/958503Reviewed-by: default avatarMartin Šrámek <msramek@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548679}
parent bb003029
......@@ -259,7 +259,13 @@ void TrafficAnnotationAuditor::GenerateFilesListForClangTool(
// to the running script and the files in the safe list will be later removed
// from the results.
if (!filter_files_based_on_heuristics || use_compile_commands) {
*file_paths = path_filters;
// If no path filter is specified, return current location. The clang tool
// will be run from the repository 'src' folder and hence this will point to
// repository root.
if (path_filters.empty())
file_paths->push_back("./");
else
*file_paths = path_filters;
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment