title: Difference between "complexity" metric and "complexity / method" metric
body: <p>In Sonar, for a particular Java class, I see :</p>
  
  <pre><code>Complexity:     830
  
  Complexity /method:     8,1
  </code></pre>
  
  <p>How could you explain the difference between those two metrics ?</p>
  
  <p>Is "Complexity" the class complexity ?</p>
  
  <p>What is the maximum complexity a class should be under ? I know methods should be less than 10 for method complexity, but what is the maximum class complexity number a class should conform to be considered not complex ?</p>
  
  <p>Thanks.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I also look at Cyclomatic-Complexity rule violations in the file.</p>
  
  <p>For a number of methods, sonar says with different complexity numbers (in french) :</p>
  
  <p>"La complexité cyclomatique de la classe est de 28 alors que le maximum autorisé est de 10."</p>
  
  <p>in english :</p>
  
  <p>"The class cyclomatic complexity is 28 but the maximum allowed is 10".</p>
  
  <p>I don't understand why it says "class cyclomatic complexity" as it seems as a "method cyclomatic complexity".</p>
  
  <p>Also, the class in question does not appears on top of the most complex class sorted by average complexity/method, as sonar says it has only 8,1 average method complexity.</p>