Search code examples
.netopen-sourcecode-analysisstatic-code-analysis

Static code analysis in a .NET build pipeline


So, my team is looking into having metrics from static code analysis as part of our team dashboard. Metrics could be absolutes as cyclomatic complexity and test coverage in percentage. Our application is based on .Net and stored at Visual Studio Online.

Has anyone experience with open source alternatives for integrating such tool into the build pipeline, either fully syndicated or by some nifty powershell, that can run such analysis and externalise the results to an API or something similar?


Solution

  • Hi you can use NDepend it a wonderful tool that help you to generate the different code analysis result.

    The only thing is it's not free. Though you can use the trial version for 14 days.

    Other than this. you can go to Analyze menu in Visual Studio and use 'Run Code Analysis for Solution' and 'Calculate Code Metrics for Solution'

    Update:

    There are other free tools as well like Nitriq and other. Nitriq can be used from the command line. you can integrate this with your solution.

    http://marcel.bowlitz.com/code-analysis-tools-ndepend-nitriq-iplasma/

    I hope this help's you