| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 print 'FindBugs run via:' | 98 print 'FindBugs run via:' |
| 99 print findbugs_command | 99 print findbugs_command |
| 100 print | 100 print |
| 101 print 'FindBugs reported the following issues:' | 101 print 'FindBugs reported the following issues:' |
| 102 for warning in sorted(findbugs_warnings): | 102 for warning in sorted(findbugs_warnings): |
| 103 print str(warning) | 103 print str(warning) |
| 104 print '*' * 80 | 104 print '*' * 80 |
| 105 print | 105 print |
| 106 else: | 106 else: |
| 107 if args.depfile: | 107 if args.depfile: |
| 108 build_utils.WriteDepfile( | 108 deps = args.auxclasspath + args.jar_paths |
| 109 args.depfile, | 109 build_utils.WriteDepfile(args.depfile, args.output_file, deps) |
| 110 build_utils.GetPythonDependencies() + args.auxclasspath | |
| 111 + args.jar_paths) | |
| 112 if args.stamp: | 110 if args.stamp: |
| 113 build_utils.Touch(args.stamp) | 111 build_utils.Touch(args.stamp) |
| 114 | 112 |
| 115 return len(findbugs_warnings) | 113 return len(findbugs_warnings) |
| 116 | 114 |
| 117 | 115 |
| 118 if __name__ == '__main__': | 116 if __name__ == '__main__': |
| 119 sys.exit(main()) | 117 sys.exit(main()) |
| 120 | 118 |
| OLD | NEW |