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 This runs findbugs with an additional flag to exclude known bugs. | 8 This runs findbugs with an additional flag to exclude known bugs. |
9 To update the list of known bugs, do this: | 9 To update the list of known bugs, do this: |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 from pylib import constants | 31 from pylib import constants |
32 from pylib.utils import findbugs | 32 from pylib.utils import findbugs |
33 | 33 |
34 | 34 |
35 def main(argv): | 35 def main(argv): |
36 parser = findbugs.GetCommonParser() | 36 parser = findbugs.GetCommonParser() |
37 | 37 |
38 options, _ = parser.parse_args() | 38 options, _ = parser.parse_args() |
39 | 39 |
40 if not options.base_dir: | 40 if not options.base_dir: |
41 options.base_dir = os.path.join(constants.CHROME_DIR, 'build', 'android', | 41 options.base_dir = os.path.join(constants.DIR_SOURCE_ROOT, 'build', |
42 'findbugs_filter') | 42 'android', 'findbugs_filter') |
43 if not options.only_analyze: | 43 if not options.only_analyze: |
44 options.only_analyze = 'org.chromium.-' | 44 options.only_analyze = 'org.chromium.-' |
45 | 45 |
46 return findbugs.Run(options) | 46 return findbugs.Run(options) |
47 | 47 |
48 | 48 |
49 if __name__ == '__main__': | 49 if __name__ == '__main__': |
50 sys.exit(main(sys.argv)) | 50 sys.exit(main(sys.argv)) |
OLD | NEW |