I ran a static code analysis on a couple of projects and got the Cyclomatic Complexity for every file in those projects from the report that was generated. Now I want to calculate the average Cyclomatic Complexity for the whole project.
How would I best achieve that?
Just adding up the Cyclomatic Complexity values of each file and then dividing it by the number of files seems wrong to me since a short header file would have the same impact as a very long file. Also, I would like to avoid weighting the file's importance by lines of code.
Is there another way to do it? For example, with a median?