Build Tasks for SonarQube Analysis
This post introduces two new Azure DevOps build tasks: 'SonarQube for MSBuild – Begin Analysis' and 'SonarQube for MSBuild – End Analysis'. These tasks automate the integration of SonarQube static code analysis into Azure Pipelines and Visual Studio Online build definitions. The 'Begin Analysis' task configures the SonarQube server, project properties, and database settings (for SonarQube versions prior to 5.2), and prepares MSBuild for analysis. The 'End Analysis' task finalizes the analysis and sends results to the SonarQube server. The post details the configuration of these tasks, including setting up service endpoints for the SonarQube server and using build variables for sensitive database parameters. It also confirms that these tasks can be used with hosted agents, provided the SonarQube server is internet-accessible.