Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Roslynator Analyzers via Nuget Package #2206

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
<PackageVersion Include="OmniSharp.Extensions.LanguageClient" Version="0.19.9" />
<PackageVersion Include="OmniSharp.Extensions.LanguageServer" Version="0.19.9" />
<PackageVersion Include="PowerShellStandard.Library" Version="5.1.1" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.9">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageVersion>
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.12.9">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageVersion>
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.12.9">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageVersion>
<PackageVersion Include="System.IO.Pipes.AccessControl" Version="5.0.0" />
<PackageVersion Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<PackageVersion Include="System.Security.Principal" Version="4.3.0" />
Expand All @@ -22,4 +34,4 @@
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="Xunit.SkippableFact" Version="1.4.13" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ public void LogException(
/// <param name="ui">The PowerShell host user interface object to log output to.</param>
internal class PSHostLogger(PSHostUserInterface ui) : IObserver<(PsesLogLevel logLevel, string message)>
{

public void OnCompleted()
{
// No-op since there's nothing to close or dispose,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), PowerShellEditorServices.Common.props))\PowerShellEditorServices.Common.props" />
<Import
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), PowerShellEditorServices.Common.props))\PowerShellEditorServices.Common.props" />

<PropertyGroup>
<TargetFrameworks>net8.0;net462</TargetFrameworks>
Expand All @@ -16,6 +17,12 @@
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" />
</ItemGroup>

<ItemGroup Label="Roslynator">
<PackageReference Include="Roslynator.Analyzers" />
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers" />
<PackageReference Include="Roslynator.Formatting.Analyzers" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\PowerShellEditorServices\PowerShellEditorServices.csproj" PrivateAssets="all" />
</ItemGroup>
Expand Down
9 changes: 8 additions & 1 deletion src/PowerShellEditorServices/PowerShellEditorServices.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), PowerShellEditorServices.Common.props))\PowerShellEditorServices.Common.props" />
<Import
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), PowerShellEditorServices.Common.props))\PowerShellEditorServices.Common.props" />

<PropertyGroup>
<AssemblyTitle>PowerShell Editor Services</AssemblyTitle>
Expand Down Expand Up @@ -41,6 +42,12 @@
<PackageReference Include="System.Security.Principal.Windows" />
</ItemGroup>

<ItemGroup Label="Roslynator">
<PackageReference Include="Roslynator.Analyzers" />
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers" />
<PackageReference Include="Roslynator.Formatting.Analyzers" />
</ItemGroup>

<Choose>
<When Condition=" '$(LocalOmniSharp)' == 'true' ">
<ItemGroup>
Expand Down
Loading