msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

Add e2e test for custom analyzer rules

Open YuliiaKovalova opened this issue 1 year ago • 1 comments

Context

In order to cover the full flow, in this tests we:

  1. Build the analyzer project(s) and package it/them into a NuGet package(s).
  2. Include a reference to the local package containing the rule(s) in the project that needs analysis (AnalysisCandidate) using a nuget.config file.
  3. Build AnalysisCandidate and verify the output for messages generated by the custom analyzers related to detecting custom rules. The structure of the rules was generated using: https://github.com/dotnet/msbuild/tree/main/template_feed/Microsoft.AnalyzerTemplate
  • instantiate missed BuildEventContext in BuildCheckConnectorLogger.cs

YuliiaKovalova avatar Apr 25 '24 10:04 YuliiaKovalova

I like the idea of having a full-strength end-to-end-via-package test, but it feels very early for that to be checked in, and the package construction stuff is low-pri for me. Is now the right time?

Let's discuss the concerns offline (@YuliiaKovalova, @rainersigwald) - I want to understand them better

JanKrivanek avatar Apr 27 '24 12:04 JanKrivanek