| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import argparse | |
| 6 import logging | 5 import logging |
| 7 import os | 6 import os |
| 8 import re | |
| 9 import shlex | |
| 10 import sys | |
| 11 import xml.dom.minidom | 7 import xml.dom.minidom |
| 12 | 8 |
| 13 from devil.utils import cmd_helper | 9 from devil.utils import cmd_helper |
| 14 from pylib import constants | 10 from pylib import constants |
| 15 | 11 |
| 16 | 12 |
| 17 _FINDBUGS_HOME = os.path.join(constants.DIR_SOURCE_ROOT, 'third_party', | 13 _FINDBUGS_HOME = os.path.join(constants.DIR_SOURCE_ROOT, 'third_party', |
| 18 'findbugs') | 14 'findbugs') |
| 19 _FINDBUGS_JAR = os.path.join(_FINDBUGS_HOME, 'lib', 'findbugs.jar') | 15 _FINDBUGS_JAR = os.path.join(_FINDBUGS_HOME, 'lib', 'findbugs.jar') |
| 20 _FINDBUGS_MAX_HEAP = 768 | 16 _FINDBUGS_MAX_HEAP = 768 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 _, raw_out, stderr = cmd_helper.GetCmdStatusOutputAndError(cmd) | 145 _, raw_out, stderr = cmd_helper.GetCmdStatusOutputAndError(cmd) |
| 150 results_doc = xml.dom.minidom.parseString(raw_out) | 146 results_doc = xml.dom.minidom.parseString(raw_out) |
| 151 | 147 |
| 152 for line in stderr.splitlines(): | 148 for line in stderr.splitlines(): |
| 153 logging.debug(' %s', line) | 149 logging.debug(' %s', line) |
| 154 | 150 |
| 155 current_warnings_set = _ParseXmlResults(results_doc) | 151 current_warnings_set = _ParseXmlResults(results_doc) |
| 156 | 152 |
| 157 return (' '.join(cmd), current_warnings_set) | 153 return (' '.join(cmd), current_warnings_set) |
| 158 | 154 |
| OLD | NEW |