| OLD | NEW | 
|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python | 
| 2 # | 2 # | 
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be | 
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. | 
| 6 | 6 | 
| 7 """Runs findbugs, and returns an error code if there are new warnings. | 7 """Runs findbugs, and returns an error code if there are new warnings. | 
| 8 | 8 | 
| 9 Other options | 9 Other options | 
| 10   --only-analyze used to only analyze the class you are interested. | 10   --only-analyze used to only analyze the class you are interested. | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
| 22 | 22 | 
| 23 from devil.utils import run_tests_helper | 23 from devil.utils import run_tests_helper | 
| 24 from pylib import constants | 24 from pylib import constants | 
| 25 from pylib.utils import findbugs | 25 from pylib.utils import findbugs | 
| 26 | 26 | 
| 27 _DEFAULT_BASE_DIR = os.path.join( | 27 _DEFAULT_BASE_DIR = os.path.join( | 
| 28     constants.DIR_SOURCE_ROOT, 'build', 'android', 'findbugs_filter') | 28     constants.DIR_SOURCE_ROOT, 'build', 'android', 'findbugs_filter') | 
| 29 | 29 | 
| 30 sys.path.append( | 30 sys.path.append( | 
| 31     os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'android', 'gyp')) | 31     os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'android', 'gyp')) | 
| 32 from util import build_utils | 32 from util import build_utils # pylint: disable=import-error | 
| 33 | 33 | 
| 34 | 34 | 
| 35 def main(): | 35 def main(): | 
| 36   parser = argparse.ArgumentParser() | 36   parser = argparse.ArgumentParser() | 
| 37 | 37 | 
| 38   parser.add_argument( | 38   parser.add_argument( | 
| 39       '-v', '--verbose', action='count', help='Enable verbose logging.') | 39       '-v', '--verbose', action='count', help='Enable verbose logging.') | 
| 40   parser.add_argument( | 40   parser.add_argument( | 
| 41       '-a', '--auxclasspath', default=None, dest='auxclasspath', | 41       '-a', '--auxclasspath', default=None, dest='auxclasspath', | 
| 42       help='Set aux classpath for analysis.') | 42       help='Set aux classpath for analysis.') | 
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 107               + args.jar_paths) | 107               + args.jar_paths) | 
| 108     if args.stamp: | 108     if args.stamp: | 
| 109       build_utils.Touch(args.stamp) | 109       build_utils.Touch(args.stamp) | 
| 110 | 110 | 
| 111   return len(findbugs_warnings) | 111   return len(findbugs_warnings) | 
| 112 | 112 | 
| 113 | 113 | 
| 114 if __name__ == '__main__': | 114 if __name__ == '__main__': | 
| 115   sys.exit(main()) | 115   sys.exit(main()) | 
| 116 | 116 | 
| OLD | NEW | 
|---|