| 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')
|
|
|