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

Side by Side Diff: tools/clang/scripts/run_tool.py

Issue 1592403002: update obsolete code.google.com documentation links (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 """Wrapper script to help run clang tools across Chromium code. 5 """Wrapper script to help run clang tools across Chromium code.
6 6
7 How to use this tool: 7 How to use this tool:
8 If you want to run the tool across all Chromium code: 8 If you want to run the tool across all Chromium code:
9 run_tool.py <tool> <path/to/compiledb> 9 run_tool.py <tool> <path/to/compiledb>
10 10
11 If you want to include all files mentioned in the compilation database: 11 If you want to include all files mentioned in the compilation database:
12 run_tool.py <tool> <path/to/compiledb> --all 12 run_tool.py <tool> <path/to/compiledb> --all
13 13
14 If you only want to run the tool across just chrome/browser and content/browser: 14 If you only want to run the tool across just chrome/browser and content/browser:
15 run_tool.py <tool> <path/to/compiledb> chrome/browser content/browser 15 run_tool.py <tool> <path/to/compiledb> chrome/browser content/browser
16 16
17 Please see https://code.google.com/p/chromium/wiki/ClangToolRefactoring for more 17 Please see https://chromium.googlesource.com/chromium/src/+/master/docs/clang_to ol_refactoring.md for more
18 information, which documents the entire automated refactoring flow in Chromium. 18 information, which documents the entire automated refactoring flow in Chromium.
19 19
20 Why use this tool: 20 Why use this tool:
21 The clang tool implementation doesn't take advantage of multiple cores, and if 21 The clang tool implementation doesn't take advantage of multiple cores, and if
22 it fails mysteriously in the middle, all the generated replacements will be 22 it fails mysteriously in the middle, all the generated replacements will be
23 lost. 23 lost.
24 24
25 Unfortunately, if the work is simply sharded across multiple cores by running 25 Unfortunately, if the work is simply sharded across multiple cores by running
26 multiple RefactoringTools, problems arise when they attempt to rewrite a file at 26 multiple RefactoringTools, problems arise when they attempt to rewrite a file at
27 the same time. To work around that, clang tools that are run using this tool 27 the same time. To work around that, clang tools that are run using this tool
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 # useful to modify files that aren't under source control--typically, these 336 # useful to modify files that aren't under source control--typically, these
337 # are generated files or files in a git submodule that's not part of Chromium. 337 # are generated files or files in a git submodule that's not part of Chromium.
338 _ApplyEdits({k: v 338 _ApplyEdits({k: v
339 for k, v in dispatcher.edits.iteritems() 339 for k, v in dispatcher.edits.iteritems()
340 if os.path.realpath(k) in filenames}) 340 if os.path.realpath(k) in filenames})
341 return -dispatcher.failed_count 341 return -dispatcher.failed_count
342 342
343 343
344 if __name__ == '__main__': 344 if __name__ == '__main__':
345 sys.exit(main()) 345 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698