Commit b7e9e03a authored by garykac's avatar garykac Committed by Commit bot

[Chromoting] Disable warning for unused strings in resources.

With the additional targets in Chromoting (Android, iOS and AppRemoting), the
check to verify that each string is being used produces lots of noise because
it is difficult to identify which strings should be used in each target.

It is non-trivial to handle all these cases cleanly with our current approach
so we'll need to disable these checks and re-visit how we want to handle
them.

BUG=448175

Review URL: https://codereview.chromium.org/848043002

Cr-Commit-Position: refs/heads/master@{#311574}
parent 418378e3
...@@ -128,6 +128,8 @@ def main(): ...@@ -128,6 +128,8 @@ def main():
help='File to touch when finished.') help='File to touch when finished.')
parser.add_option('-r', '--grd', dest='grd', action='append', parser.add_option('-r', '--grd', dest='grd', action='append',
help='grd file') help='grd file')
parser.add_option('--strict', dest='strict', action='store_true',
help='Use strict verification checks.')
options, args = parser.parse_args() options, args = parser.parse_args()
if not options.touch: if not options.touch:
...@@ -150,17 +152,18 @@ def main(): ...@@ -150,17 +152,18 @@ def main():
if not VerifyFile(f, all_resources, used_tags): if not VerifyFile(f, all_resources, used_tags):
exit_code = 1 exit_code = 1
# Determining if a resource is being used in the Android app is tricky if options.strict:
# because it requires annotating and parsing Android XML layout files. warnings = False
# For now, exclude Android strings from this check. # Determining if a resource is being used in the Android app is tricky
warnings = False # because it requires annotating and parsing Android XML layout files.
for tag in non_android_resources: # For now, exclude Android strings from this check.
if tag not in used_tags: for tag in non_android_resources:
print ('%s/%s:0: warning: %s is defined but not used') % \ if tag not in used_tags:
(os.getcwd(), sys.argv[2], tag) print ('%s/%s:0: warning: %s is defined but not used') % \
warnings = True (os.getcwd(), sys.argv[2], tag)
if warnings: warnings = True
print WARNING_MESSAGE if warnings:
print WARNING_MESSAGE
if exit_code == 0: if exit_code == 0:
f = open(options.touch, 'a') f = open(options.touch, 'a')
......
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