I am working on writing a script that outputs information about my written source code.
So far, I am analysing the code with Python scripts that I have written.
There is a Test.cs
class which is used for this analysis.
Now I want to calculate the cyclomatic complexity from Test.cs
.
Currently I am working on Visual Studio Code. I am aware that Visual Studio offers such a functionality and there are also packages that I can use for this.
However, I wanted to find out whether it is possible
- a.) to write a Python script which can analyse my
Test.cs
class or - b.) to create a C# project to analyse the corresponding
Test.cs
class and if so, how can I pass the value for my script?
Because I would like to output and evaluate this value separately for the user.
Also I found this interesting documentation:
But here it is not clear to me how I could build and call up the Metrics.exe
accordingly.
Or are there other approaches I could pursue?
I look forward to your feedback.