<?xml version="1.0" encoding="UTF-8"?>

<faqs title="Frequently Asked Questions">

  <part id="development">
    <title>Development</title>
   
    <faq id="parser-order">
      <question>
        In which order are nodes visited?
      </question>
      <answer>
        <p>The parser performs a depth-first traversal. 
        Consider the given source: </p>
        
        <source><![CDATA[
public class Foo {
String name;
    private class Bar {
    String x;
    }
int total;
}
        ]]></source>
        
        <p>The visiting order here will be: 
<ol>
    <li>Class Foo</li>
    <li>Field name</li>
    <li>Class Bar</li>
    <li>Field x</li>
    <li>Field total</li>
</ol>    
</p>
        <p>Note that the total field of Foo will be visited after visiting the fields in Bar. 
        You must take this into account for certain rules.</p>
      </answer>
    </faq>

    <faq id="fields-from-class">
      <question>
        Is there a simple way of getting fields from a given class?
      </question>
      <answer>
        <p>Yes, the symbol table can supply that information.</p>
        <p>FIXME add code example</p>
      </answer>
    </faq>
  </part>
  <part id="rules">
    <title>Rules</title>
   
    <faq id="how-usefull">
      <question>
        How usefull are the rules?
      </question>
      <answer>
        <p>Have this clear: having a projects with no pmd violations does not mean at all, I repeat,
            It does not mean at all, not at the minimum expected, that the project has any quality.
            For illustrating this I'll tell a little story taken from my work (a sadly real story).
            Some classes had fields that were reported as unused, (unused code ruleset) as developers
            saw this, they wanted to remove the violation, (not fix the code, fix the violation) so
            the action took was to add useless log sentences with something like: 
            'unused variable '+unusedVariable. Belive it or not, the code was worse than the original
            and reported less pmd violations.
         </p>
         <p>In a more positive way: use the rules as you see them fix, don't try to remove violations 
         per-se try to review the code and see if the particular cases you are using are correct or not.
         </p>
      </answer>
    </faq>
  </part>  
  <!-- 
  <part id="install">
    <title>Installation</title>
   
    <faq id="how-install">
      <question>
        How do I install Foo?
      </question>
      <answer>
        <p>some markup goes here</p>
      </answer>
    </faq>
  </part>  
  -->
</faqs>
