Skip to content

Commit

Permalink
- add LocalAnalyzersSDKRepo property
Browse files Browse the repository at this point in the history
- add documentation
  • Loading branch information
dawedawe committed Nov 8, 2023
1 parent 7330b80 commit 5325858
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
<ServerGarbageCollection>true</ServerGarbageCollection>
<LangVersion>preview</LangVersion>
<OtherFlags>$(OtherFlags) --test:GraphBasedChecking --test:ParallelOptimization --test:ParallelIlxGen</OtherFlags>
<!-- Set to true and adjust the path to your local repo if you want to use that instead of the nuget packages -->
<UseLocalAnalyzersSDK>false</UseLocalAnalyzersSDK>
<LocalAnalyzersSDKRepo>../../../FSharp.Analyzers.SDK</LocalAnalyzersSDKRepo>
</PropertyGroup>

<ItemGroup Condition="'$(IsPackable)' == 'true'">
Expand Down
5 changes: 5 additions & 0 deletions docs/content/contributions.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,8 @@ Please add [a new entry](https://keepachangelog.com/en/1.1.0/) for your changes.

Unless, there are technical reason blocking us, we will try and ship your contribution as soon as possible.
Our CI process should pick up new version from the changelog and push new packages to NuGet.org once the code is on the `main` branch.

## Using a local analyzers SDK

You might run into a situation when the SDK packages don't provide the features you need for your analyzers development.
In such a case, you can edit the `Directory.Build.props` file and set `UseLocalAnalyzersSDK` to `true` and let `LocalAnalyzersSDKRepo` point to your local SDK repository.
2 changes: 1 addition & 1 deletion src/Ionide.Analyzers/Ionide.Analyzers.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</ItemGroup>

<ItemGroup Condition="'$(UseLocalAnalyzersSDK)' == 'true'">
<ProjectReference Include="../../../FSharp.Analyzers.SDK/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.fsproj" />
<ProjectReference Include="$(LocalAnalyzersSDKRepo)/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.fsproj" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/Ionide.Analyzers.Tests/Ionide.Analyzers.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup Condition="'$(UseLocalAnalyzersSDK)' == 'true'">
<ProjectReference Include="../../../FSharp.Analyzers.SDK/src/FSharp.Analyzers.SDK.Testing/FSharp.Analyzers.SDK.Testing.fsproj" />
<ProjectReference Include="$(LocalAnalyzersSDKRepo)/src/FSharp.Analyzers.SDK.Testing/FSharp.Analyzers.SDK.Testing.fsproj" />
</ItemGroup>

</Project>

0 comments on commit 5325858

Please sign in to comment.