dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.02k stars 4.03k forks source link

The TestImpact switch needs tests for the command line and MSBuild task+targets #12764

Open agocke opened 8 years ago

agocke commented 8 years ago

/cc @jaredpar @JohnHamby @gafter @shyamnamboodiripad @tannergooding

agocke commented 8 years ago

To what @jaredpar was mentioning, the places we need to ensure coverage are in the task, targets, parser, and options.

To use debug as an example, the option is handled for C# in:

  1. The targets: http://source.roslyn.io/#MSBuildFiles/C/Users/vslsnap/.nuget/packages/Microsoft.Net.Compilers/1.3.2/tools/Microsoft.CSharp.Core.targets,79
  2. The task: http://source.roslyn.io/#Microsoft.Build.Tasks.CodeAnalysis/ManagedCompiler.cs,672
  3. The parser: http://source.roslyn.io/#Microsoft.CodeAnalysis.CSharp/CommandLine/CSharpCommandLineParser.cs,557
  4. The EmitOptions: http://source.roslyn.io/#Microsoft.CodeAnalysis.CSharp/CommandLine/CSharpCommandLineParser.cs,1200

While EmitOptions uses a public enum, I believe it was decided to just use a public string and an internal enum.