Should nDepend's output folder be added to source control?

378 views Asked by At

Background

I am new to nDepend and wish to use it on a project that will be maintained with multiple developers in Subversion.

I am quite keen on keeping historic nDepend analysis results and notice that nDepend does that quite well by default by placing such results in the folder defined by $(NdProjectOutputDir) - usually a subfolder called NDependOut immediately beneath where the .ndproj file is located.

enter image description here

This means however that the generated nDepend XML and binary files are located along with my source code.

enter image description here

I have read the following articles by nDepend:

...and even tried a Google search "ndepend ndependout source control" which at the time of writing, the latter was not particularly useful for my questions below.

Questions

  1. Should NDependOut be added to SCM? They strike me as essentially output artifacts as the result of the source code in the same way as compiling a project is and should not be added. But I am not sure that philosophy applies
  2. If the NDependOut folder is added to source control for the benefit of other users, do I run the risk of conflict?
  3. Should we instead nominate one person (or perhaps a build machine) to be the sole publisher of such reports?

I note at that in the root NDependOut folder there are two files:

  • NDependAnalysisResult_VIP_2015Jun11_18h33.ndar - binary
  • InfoWarnings.xml - text obviously
1

There are 1 answers

1
Patrick from NDepend team On BEST ANSWER

As you noticed you are quite free to decide. When you wrote:

This means however that the generated NDepend XML and binary files are located along with my source code.

...maybe it means you haven't seen the possibility to customize both...

  • historic analysis result + report storage root folder,

  • and trend metric storage root folders,

...both from NDepend Project Properties > Analysis, see screenshots below.


To answer your question in reverse order:

3) I'd say that if you choose to store this data in your SCM, it should be done by your Build Process automatically after a successful build process + NDepend analysis

2) No there is no risk of conflict on Historic analysis result + reports since they are stored in a hierarchy of folders named after the build date/time. Concerning trend metric yes there is a risk of conflict since the storage is made by one XML file per year.

1)

  • It is certainly worth sharing trend metrics with the team through SCM.

  • It is certainly worth sharing the baseline for diff analysis result as well through SCM. Typically the baseline for diff represents the last release in production code snapshot.

  • It is certainly worth sharing the most recent report generated by the build process (not necessarily through SCM, it should be available through an url).

  • Concerning all intermediate analysis result it is up to you, but if they are not used as baseline for diff, probably they will be useless.


NDepend Historic Custom Folder Settings

NDepend Trend Metrics Custom Folder Settings