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

Unified Diff: remoting/tools/verify_resources.py

Issue 848043002: [Chromoting] Disable warning for unused strings in resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/tools/verify_resources.py
diff --git a/remoting/tools/verify_resources.py b/remoting/tools/verify_resources.py
index 6677add5dbf4609d12031891832ad90983afb650..871c0faabc1e04bc8c2f37ff8013d4014e1d2eb3 100755
--- a/remoting/tools/verify_resources.py
+++ b/remoting/tools/verify_resources.py
@@ -128,6 +128,8 @@ def main():
help='File to touch when finished.')
parser.add_option('-r', '--grd', dest='grd', action='append',
help='grd file')
+ parser.add_option('--strict', dest='strict', action='store_true',
+ help='Use strict verification checks.')
options, args = parser.parse_args()
if not options.touch:
@@ -150,17 +152,18 @@ def main():
if not VerifyFile(f, all_resources, used_tags):
exit_code = 1
- # Determining if a resource is being used in the Android app is tricky
- # because it requires annotating and parsing Android XML layout files.
- # For now, exclude Android strings from this check.
- warnings = False
- for tag in non_android_resources:
- if tag not in used_tags:
- print ('%s/%s:0: warning: %s is defined but not used') % \
- (os.getcwd(), sys.argv[2], tag)
- warnings = True
- if warnings:
- print WARNING_MESSAGE
+ if options.strict:
+ warnings = False
+ # Determining if a resource is being used in the Android app is tricky
+ # because it requires annotating and parsing Android XML layout files.
+ # For now, exclude Android strings from this check.
+ for tag in non_android_resources:
+ if tag not in used_tags:
+ print ('%s/%s:0: warning: %s is defined but not used') % \
+ (os.getcwd(), sys.argv[2], tag)
+ warnings = True
+ if warnings:
+ print WARNING_MESSAGE
if exit_code == 0:
f = open(options.touch, 'a')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698