Ionide.Analyzers
Welcome to the Ionide Analyzers project.
Quick start
In its simplest form, running analyzers requires running the fsharp-analyzers tool and pass your *.fsproj
and a folder that contains analyzers binaries.
|
Of course, the --analyzers-path
is a bit tricky. We need to download the binary and find them somehow.
You can add a NuGet reference to your project:
|
This will download the package to our local NuGet cache.
But how do we find that local path?
Starting dotnet 8 RC 2
, we can evaluate an MSBuild property which NuGet restore creates for us.
dotnet build ./src/MyProject.fsproj --getProperty:PkgIonide_Analyzers
PkgIonide_Analyzers
comes from the {projectName}.projectFileExtension.nuget.g.props file.
This can yield
C:\Users\username\.nuget\packages\ionide.analyzers\0.1.1
And we can use that path to pass to the tool:
dotnet fsharp-analyzers --project ./src/MyProject.fsproj --analyzers-path C:\Users\username\.nuget\packages\ionide.analyzers\0.1.1
Contribute!
Learn how to get started contributing!