?? running.html
字號:
</p></dd></dl></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="commandLineOptions"></a>3. Command-line Options</h2></div></div></div><p> This section describes the command line options supported by <span class="application">FindBugs</span>. These command line options may be used when invoking <span class="application">FindBugs</span> directly, or when using a wrapper script.</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e804"></a>3.1. Common command-line options</h3></div></div></div><p>These options may be used with both the GUI and command-line interfaces.</p><div class="variablelist"><dl><dt><span class="term"><span><strong class="command">-effort:min</strong></span></span></dt><dd><p> This option disables analyses that increase precision but also increase memory consumption. You may want to try this option if you find that <span class="application">FindBugs</span> runs out of memory, or takes an unusually long time to complete its analysis. </p></dd><dt><span class="term"><span><strong class="command">-effort:max</strong></span></span></dt><dd><p> Enable analyses which increase precision and find more bugs, but which may require more memory and take more time to complete. </p></dd><dt><span class="term"><span><strong class="command">-project</strong></span> <em class="replaceable"><code>project</code></em></span></dt><dd><p> Specify a project to be analyzed. The project file you specify should be one that was created using the GUI interface. It will typically end in the extension <code class="filename">.fb</code> or <code class="filename">.fbp</code>. </p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e844"></a>3.2. GUI Options</h3></div></div></div><p>These options are only accepted by the Graphical User Interface.</p><div class="variablelist"><dl><dt><span class="term"><span><strong class="command">-look:</strong></span><em class="replaceable"><code>plastic|gtk|native</code></em></span></dt><dd><p> Set Swing look and feel. </p></dd></dl></div><p></p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e860"></a>3.3. Text UI Options</h3></div></div></div><p>These options are only accepted by the Text User Interface.</p><div class="variablelist"><dl><dt><span class="term"><span><strong class="command">-sortByClass</strong></span></span></dt><dd><p> Sort reported bug instances by class name. </p></dd><dt><span class="term"><span><strong class="command">-include</strong></span> <em class="replaceable"><code>filterFile.xml</code></em></span></dt><dd><p> Only report bug instances that match the filter specified by <em class="replaceable"><code>filterFile.xml</code></em>. See <a href="filter.html" title="Chapter 8. Filter Files">Chapter 8, <i>Filter Files</i></a>. </p></dd><dt><span class="term"><span><strong class="command">-exclude</strong></span> <em class="replaceable"><code>filterFile.xml</code></em></span></dt><dd><p> Report all bug instances except those matching the filter specified by <em class="replaceable"><code>filterFile.xml</code></em>. See <a href="filter.html" title="Chapter 8. Filter Files">Chapter 8, <i>Filter Files</i></a>. </p></dd><dt><span class="term"><span><strong class="command">-onlyAnalyze</strong></span> <em class="replaceable"><code>com.foobar.MyClass,com.foobar.mypkg.*</code></em></span></dt><dd><p> Restrict analysis to find bugs to given comma-separated list of classes and packages. Unlike filtering, this option avoids running analysis on classes and packages that are not explicitly matched: for large projects, this may greatly reduce the amount of time needed to run the analysis. (However, some detectors may produce inaccurate results if they aren't run on the entire application.) Classes should be specified using their full classnames (including package), and packages should be specified in the same way they would in a Java <code class="literal">import</code> statement to import all classes in the package (i.e., add <code class="literal">.*</code> to the full name of the package). Replace <code class="literal">.*</code> with <code class="literal">.-</code> to also analyze all subpackages. </p></dd><dt><span class="term"><span><strong class="command">-low</strong></span></span></dt><dd><p> Report all bugs. </p></dd><dt><span class="term"><span><strong class="command">-medium</strong></span></span></dt><dd><p> Report medium and high priority bugs. This is the default setting. </p></dd><dt><span class="term"><span><strong class="command">-high</strong></span></span></dt><dd><p> Report only high priority bugs. </p></dd><dt><span class="term"><span><strong class="command">-relaxed</strong></span></span></dt><dd><p> Relaxed reporting mode. For many detectors, this option suppresses the heuristics used to avoid reporting false positives. </p></dd><dt><span class="term"><span><strong class="command">-xml</strong></span></span></dt><dd><p> Produce the bug reports as XML. The XML data produced may be viewed in the GUI at a later time. You may also specify this option as <span><strong class="command">-xml:withMessages</strong></span>; when this variant of the option is used, the XML output will contain human-readable messages describing the warnings contained in the file. XML files generated this way are easy to transform into reports. </p></dd><dt><span class="term"><span><strong class="command">-html</strong></span></span></dt><dd><p> Generate HTML output. By default, <span class="application">FindBugs</span> will use the <code class="filename">default.xsl</code> <a href="http://www.w3.org/TR/xslt" target="_top">XSLT</a> stylesheet to generate the HTML: you can find this file in <code class="filename">findbugs.jar</code>, or in the <span class="application">FindBugs</span> source or binary distributions. Variants of this option include <span><strong class="command">-html:plain.xsl</strong></span>, <span><strong class="command">-html:fancy.xsl</strong></span> and <span><strong class="command">-html:fancy-hist.xsl</strong></span>. The <code class="filename">plain.xsl</code> stylesheet does not use Javascript or DOM, and may work better with older web browsers, or for printing. The <code class="filename">fancy.xsl</code> stylesheet uses DOM and Javascript for navigation and CSS for visual presentation. The <span><strong class="command">fancy-hist.xsl</strong></span> an evolution of <span><strong class="command">fancy.xsl</strong></span> stylesheet. It makes an extensive use of DOM and Javascript for dynamically filtering the lists of bugs. </p><p> If you want to specify your own XSLT stylesheet to perform the transformation to HTML, specify the option as <span><strong class="command">-html:<em class="replaceable"><code>myStylesheet.xsl</code></em></strong></span>, where <em class="replaceable"><code>myStylesheet.xsl</code></em> is the filename of the stylesheet you want to use. </p></dd><dt><span class="term"><span><strong class="command">-emacs</strong></span></span></dt><dd><p> Produce the bug reports in Emacs format. </p></dd><dt><span class="term"><span><strong class="command">-xdocs</strong></span></span></dt><dd><p> Produce the bug reports in xdoc XML format for use with Apache Maven. </p></dd><dt><span class="term"><span><strong class="command">-output</strong></span> <em class="replaceable"><code>filename</code></em></span></dt><dd><p> Produce the output in the specified file. </p></dd><dt><span class="term"><span><strong class="command">-outputFile</strong></span> <em class="replaceable"><code>filename</code></em></span></dt><dd><p> This argument is deprecated. Use <span><strong class="command">-output</strong></span> instead. </p></dd><dt><span class="term"><span><strong class="command">-nested</strong></span><em class="replaceable"><code>[:true|false]</code></em></span></dt><dd><p> This option enables or disables scanning of nested jar and zip files found in the list of files and directories to be analyzed. By default, scanning of nested jar/zip files is enabled. To disable it, add <span><strong class="command">-nested:false</strong></span> to the command line arguments. </p></dd><dt><span class="term"><span><strong class="command">-auxclasspath</strong></span> <em class="replaceable"><code>classpath</code></em></span></dt><dd><p> Set the auxiliary classpath for analysis. This classpath should include all jar files and directories containing classes that are part of the program being analyzed but you do not want to have analyzed for bugs. </p></dd></dl></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="building.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="gui.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 3. Building <span class="application">FindBugs</span>™ from Source </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 5. Using the <span class="application">FindBugs</span> GUI</td></tr></table></div></body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -