Reputation: 27
Using SourceMonitor xml command file, I'm trying to analyze a whole checked out repository from Git that I know for a fact that it has both C and C++ code in the same directory.
This a snippet of my XML command file.
<?xml version="1.0" encoding="utf-8"?>
<sourcemonitor_commands>
<command>
<project_file>testproj.smproj</project_file>
<checkpoint_name>Baseline</checkpoint_name>
<project_language>C++</project_language>
<source_directory>C:\Users\....</source_directory>
.......
</command>
In the GUI I added manually other type of extensions and it worked! I tried adding this line in the above xml file but this resulted in zero values for the metrics for the .C files:
<file_extensions>*.h,*.cpp,*.c,*.pdl</file_extensions>
What am I doing wrong? and is this even possible? I want to do it all in just one SourceMonitor project not more than that.
Upvotes: 2
Views: 404
Reputation: 10238
Create two separate SourceMonitor projects for your software corpus.
The fact that you cannot get one software metric from a mixed-language Project reflects the way SourceMonitor is designed. It's built around /values/ of metrics, that can be shown, compared, sorted... Each language has its own set of metrics (the class metrics of C++ are not applicable in C). There are also different "green zones" for same-name metrics of different languages.
The practical value of combining several languages would be of limited value: How would you, for example, compare two files of different programming languages in terms of their Max complexity?
To illustrate this: You double-click on a checkpoint to get a table with absolute values of all metrics involved, file by file, in alphabetic order (File Name). All metric values in these tables are absolute ones. By clicking on the corresponding header, you can sort for the criterion you are most interested in (typically, the file responsible for an extreme value of the checkpoint).
Upvotes: 0