Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2677)

Unified Diff: build/android/findbugs_diff.py

Issue 11273026: The findbugs_diff and lib. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/findbugs_filter/findbugs_exclude.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/findbugs_diff.py
diff --git a/build/android/findbugs_diff.py b/build/android/findbugs_diff.py
new file mode 100755
index 0000000000000000000000000000000000000000..b3afa3f4c5397da1fe021ac575136f195323d62f
--- /dev/null
+++ b/build/android/findbugs_diff.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+#
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Runs findbugs, and returns an error code if there are new warnings.
+This runs findbugs with an additional flag to exclude known bugs.
+To update the list of known bugs, do this:
+
+ findbugs_diff.py --rebaseline
+
+Note that this is separate from findbugs_exclude.xml. The "exclude" file has
+false positives that we do not plan to fix. The "known bugs" file has real
+bugs that we *do* plan to fix (but haven't done so yet).
+
+Other options
+ --only-analyze used to only analyze the class you are interested.
+ --relase-build analyze the classes in out/Release directory.
+ --findbugs-args used to passin other findbugs's options.
+
+Run
+ $CHROM_SRC/third_party/findbugs/bin/findbugs -textui for details.
+
+"""
+
+import optparse
+import os
+import sys
+
+from pylib import findbugs
+
+
+def main(argv):
+ parser = findbugs.GetCommonParser()
+
+ options, _ = parser.parse_args()
+
+ chrome_src = os.getenv('CHROME_SRC')
+
+ if not options.base_dir:
+ options.base_dir = os.path.join(chrome_src, 'build', 'android',
+ 'findbugs_filter')
+ if not options.only_analyze:
+ options.only_analyze = 'org.chromium.-'
+
+ return findbugs.Run(options)
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
« no previous file with comments | « no previous file | build/android/findbugs_filter/findbugs_exclude.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698