Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: tools/clang/scripts/run_tool.py

Issue 2905263002: Filter added to prune files before applying network annotation extractor. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/clang/scripts/run_tool.py
diff --git a/tools/clang/scripts/run_tool.py b/tools/clang/scripts/run_tool.py
index ce4888cc391bbce6823b490e06ecb0f6933d1c8e..40be50afa38182fc9e392f50effd39de0b96c26f 100755
--- a/tools/clang/scripts/run_tool.py
+++ b/tools/clang/scripts/run_tool.py
@@ -202,6 +202,9 @@ def main():
required=True,
help='path to the directory that contains the compile database')
parser.add_argument(
+ '--source-filenames',
+ help='optional path to a file including filenames to process')
+ parser.add_argument(
'path_filter',
nargs='*',
help='optional paths to filter what files the tool is run on')
@@ -223,6 +226,8 @@ def main():
if args.all:
source_filenames = set(_GetFilesFromCompileDB(args.p))
+ elif args.source_filenames:
+ source_filenames = open(args.source_filenames, 'r').read().split('\n')
else:
git_filenames = set(_GetFilesFromGit(args.path_filter))
# Filter out files that aren't C/C++/Obj-C/Obj-C++.

Powered by Google App Engine
This is Rietveld 408576698