]> granicus.if.org Git - clang/blobdiff - www/analyzer/xcode.html
Fix ALL the markup.
[clang] / www / analyzer / xcode.html
index 6abf9d5614e6a031abea58575acef31dedef14f8..ac75a04754708e5465df85941418cbcf66f30518 100644 (file)
@@ -3,8 +3,8 @@
 <html>
 <head>
   <title>Build and Analyze: running the analyzer within Xcode</title>
-  <link type="text/css" rel="stylesheet" href="content.css" />
-  <link type="text/css" rel="stylesheet" href="menu.css" />
+  <link type="text/css" rel="stylesheet" href="content.css">
+  <link type="text/css" rel="stylesheet" href="menu.css">
   <script type="text/javascript" src="scripts/menu.js"></script>
   <script type="text/javascript" src="scripts/dbtree.js"></script>  
 </head>
@@ -33,13 +33,11 @@ presents analysis results directly within Xcode's editor.</p>
 <p><b>Yes</b>. Instructions are included below.</p>
 
 </td>
-<td style="padding-left:10px">
-<center>
-  <a href="images/analyzer_html.png"><img src="images/analyzer_xcode.png" width="620px" border=0></a>
-<br><b>Viewing static analyzer results in Xcode</b></center>
+<td style="padding-left:10px; text-align:center">
+  <a href="images/analyzer_xcode.png"><img src="images/analyzer_xcode.png" width="620px" alt="analyzer in xcode"></a>
+<br><b>Viewing static analyzer results in Xcode</b>
 </td></tr></table>
 
-<!-->
 <h3>Key features:</h3>
 <ul>
   <li><b>Integrated workflow:</b> Results are integrated within Xcode. There is
@@ -47,9 +45,9 @@ presents analysis results directly within Xcode's editor.</p>
   single keystroke or mouse click.</li>
   <li><b>Transparency:</b> Works effortlessly with Xcode projects (including iPhone projects).
   <li><b>Cons:</b> Doesn't work well with non-Xcode projects. For those,
-  consider using <a href="scan-build.html"><b>scan-build</b></a>.
+  consider using <a href="/scan-build.html"><b>scan-build</b></a>.
 </ul>
--->
+
 
 <h2>Getting Started</h2>
 
@@ -103,27 +101,39 @@ specify for static analysis.  Within this model it provides you two basic modes:
   <li><b>--use-checker-build</b>: Switch Xcode to using the <tt>clang</tt> provided by the specified analyzer build.</li>
 </ul>
 
+<h4>Things to keep in mind</h4>
+
+<ul>
+<li>You should quit Xcode prior to running <tt>set-xcode-analyzer</tt>.</li>
+<li>You will need to run <tt>set-xcode-analyzer</tt> under <b><tt>sudo</tt></b>
+  in order to have write privileges to modify the Xcode configuration files.</li>
+</ul>
+
 <h4>Examples</h4>
 
-<p>Telling Xcode to use checker-235 for <i>Build and Analyze</i>:</p>
+<p><b>Example 1</b>: Telling Xcode to use checker-235 for <i>Build and Analyze</i>:</p>
 
 <pre class="code_example">
 $ pwd
 /tmp
 $ tar xjf checker-235.tar.bz2
-$ checker-235/set-xcode-analyzer --use-checker-build=/tmp/checker-235
+$ sudo checker-235/set-xcode-analyzer --use-checker-build=/tmp/checker-235
 </pre>
 
-<p>Telling Xcode to use a very specific version of <tt>clang</tt>:</p>
+<p>Note that you typically won't install an analyzer build in <tt>/tmp</tt>, but
+the point of this example is that <tt>set-xcode-analyzer</tt> just wants a full
+path to an untarred analyzer build.</p>
+
+<p><b>Example 2</b>: Telling Xcode to use a very specific version of <tt>clang</tt>:</p>
 
 <pre class="code_example">
-$ set-xcode-analyzer --use-checker-build=~/mycrazyclangbuild/bin/clang
+$ sudo set-xcode-analyzer --use-checker-build=~/mycrazyclangbuild/bin/clang
 </pre>
 
-<p>Resetting Xcode to its default behavior:</p>
+<p><b>Example 3</b>: Resetting Xcode to its default behavior:</p>
 
 <pre class="code_example">
-$ set-xcode-analyzer -use-xcode-clang
+$ sudo set-xcode-analyzer --use-xcode-clang
 </pre>
 
 </div>