diff options
author | garykac <garykac@chromium.org> | 2015-01-14 15:52:01 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-14 23:52:58 +0000 |
commit | b7e9e03aefb4b14071acef9028cecafb5a4db35f (patch) | |
tree | 59a591780e5fae0d6e18bb5b112871e626e7abd3 /remoting/tools | |
parent | 418378e33e6fbdbbe3dfbb3dafa045abf9e93710 (diff) | |
download | chromium_src-b7e9e03aefb4b14071acef9028cecafb5a4db35f.zip chromium_src-b7e9e03aefb4b14071acef9028cecafb5a4db35f.tar.gz chromium_src-b7e9e03aefb4b14071acef9028cecafb5a4db35f.tar.bz2 |
[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}
Diffstat (limited to 'remoting/tools')
-rwxr-xr-x | remoting/tools/verify_resources.py | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/remoting/tools/verify_resources.py b/remoting/tools/verify_resources.py index 6677add..871c0fa 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') |