FSharp.Analyzers.SDK
FSharp.Analyzers.SDK copied to clipboard
Utilize Fsc args in msbuild analyze if available
This kind of revitalizes https://github.com/ionide/FSharp.Analyzers.SDK/pull/164, but this takes a slightly different approach.
- Instead of trying to do a DesignTimeBuild within msbuild, it will try to run after a
CoreCompile/AfterBuildtarget actually runs. - This uses the
RunAnalyzerorRunAnalyzersDuringBuild(see Roslyn variables) to determine if it should run or not. - This will skip the
FsharpAnalyzerAfterBuildtarget ifCoreCompiledoes not produce FscArgs. However someone can useFSharpAnalyzers_AlwaysRunAfterBuildto always run after a build, still using Ionide.ProjInfo as before to do design time builds.
Wow, this looks amazing! Will play with this when I can!
This follows incremental builds so it won't run unless CoreCompile produces FscArgs.
I'm hearing you say that the output Property/Item isn't being set on purely-incremental builds. I'm not sure that is expected behavior - I'd expect that an incrementally-skipped Target would emit its outputs.
I'd expect that an incrementally-skipped Target would emit its outputs.
Yeah it's not really incremental usingg the Inputs/Outputs semantics, only running conditionally when FscCommandLineArgs gets set from a CoreCompile.
Ok updated my comment on incremental builds, since following Inputs/Outputs would probably be too much effort.