Skip to content

Commit

Permalink
Re enable analyzers for Visual Studio build (Azure#9912)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhsubra authored Feb 23, 2023
1 parent ea5b711 commit 16c176b
Show file tree
Hide file tree
Showing 10 changed files with 264 additions and 359 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,22 +252,12 @@ jobs:
uses: microsoft/[email protected]

- name: Build Bicep.sln
# disabling analyzers because of a Roslyn dependency issue that only occurs in msbuild in CI
# however we have already run the same analyzers in the dotnet build
run: msbuild Bicep.sln /restore /p:Configuration=Release /p:EnforceCodeStyleInBuild=false /p:EnableNETAnalyzers=false /v:m /bl:./src/binlog/bicep_build.binlog

- name: Upload Bicep.sln build binlog
uses: actions/upload-artifact@v3
with:
name: build-binlog-files
path: ./src/binlog/bicep_build.binlog
if-no-files-found: error
run: dotnet build --configuration release

- name: Build BicepInVisualStudio.sln
# TODO: Find a way to re-enable analyzers
run: msbuild src/vs-bicep/BicepInVisualStudio.sln /restore /p:Configuration=Release /p:EnforceCodeStyleInBuild=false /p:EnableNETAnalyzers=false /v:m /bl:./src/binlog/bicep_in_visual_studio_build.binlog
run: msbuild src/vs-bicep/BicepInVisualStudio.sln /restore /p:Configuration=Release /v:m /bl:./src/binlog/bicep_in_visual_studio_build.binlog

- name: Upload Bicep.sln build binlog
- name: Upload BicepInVisualStudio.sln build binlog
uses: actions/upload-artifact@v3
with:
name: build-binlog-files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.5.0-2.final" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Microsoft.Test.Apex.VisualStudio" Version="17.1.32510.401" />
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="17.2.41" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
"resolved": "3.3.4",
"contentHash": "0k2Jwpc8eq0hjOtX6TxRkHm9clkJ2PAQ3heEHgqIJZcsfdFosC/iyz18nsgTVDDWpID80rC7aiYK7ripx+Qndg=="
},
"Microsoft.Net.Compilers.Toolset": {
"type": "Direct",
"requested": "[4.5.0-2.final, )",
"resolved": "4.5.0-2.final",
"contentHash": "5AKgCibYDYbiRdTdkNtBZnKZ5leEAJsbXl5bDPflqYNtrbdZcAW5GX/6kbmkUiqDiXwRxEf9x4tHgq1BsJUd+A=="
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
"requested": "[17.2.0, )",
Expand Down Expand Up @@ -1137,7 +1143,7 @@
"Microsoft.VisualStudio.Shell.Interop": "[17.2.32505.113, )",
"Microsoft.VisualStudio.Threading": "[17.2.32, )",
"Microsoft.VisualStudio.Utilities": "[17.2.32505.113, )",
"Microsoft.VisualStudio.Workspace.VSIntegration": "[16.3.43, )",
"Microsoft.VisualStudio.Workspace.VSIntegration": "[17.1.11-preview-0002, )",
"Microsoft.Visualstudio.Telemetry": "[16.5.6, )",
"OmniSharp.Extensions.LanguageServer": "[0.19.6, )"
}
Expand All @@ -1152,7 +1158,8 @@
"Microsoft.VisualStudio.Editor": "[17.2.3194, )",
"Microsoft.VisualStudio.LanguageServer.Client.Implementation": "[17.2.2105, )",
"Microsoft.VisualStudio.Shell.Framework": "[17.2.32505.113, )",
"Microsoft.VisualStudio.Workspace": "[17.1.11-preview-0002, )"
"Microsoft.VisualStudio.Workspace": "[17.1.11-preview-0002, )",
"Microsoft.VisualStudio.Workspace.VSIntegration": "[17.1.11-preview-0002, )"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.5.0-2.final" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Microsoft.Test.Apex.VisualStudio" Version="17.1.32510.401" />
<PackageReference Include="Microsoft.VisualStudio.Composition" Version="17.2.41" />
<PackageReference Include="Microsoft.VisualStudio.Editor" Version="17.2.3194" />
<PackageReference Include="Microsoft.VisualStudio.LanguageServer.Client.Implementation" Version="17.2.2105" />
<PackageReference Include="Microsoft.VisualStudio.Shell.Framework" Version="17.2.32505.113" />
<PackageReference Include="Microsoft.VisualStudio.Workspace" Version="17.1.11-preview-0002" />
<PackageReference Include="Microsoft.VisualStudio.Workspace.VSIntegration" Version="17.1.11-preview-0002" />

</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
"resolved": "3.3.4",
"contentHash": "0k2Jwpc8eq0hjOtX6TxRkHm9clkJ2PAQ3heEHgqIJZcsfdFosC/iyz18nsgTVDDWpID80rC7aiYK7ripx+Qndg=="
},
"Microsoft.Net.Compilers.Toolset": {
"type": "Direct",
"requested": "[4.5.0-2.final, )",
"resolved": "4.5.0-2.final",
"contentHash": "5AKgCibYDYbiRdTdkNtBZnKZ5leEAJsbXl5bDPflqYNtrbdZcAW5GX/6kbmkUiqDiXwRxEf9x4tHgq1BsJUd+A=="
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
"requested": "[17.2.0, )",
Expand Down Expand Up @@ -137,6 +143,17 @@
"System.Collections.Immutable": "5.0.0"
}
},
"Microsoft.VisualStudio.Workspace.VSIntegration": {
"type": "Direct",
"requested": "[17.1.11-preview-0002, )",
"resolved": "17.1.11-preview-0002",
"contentHash": "gZ74u5Qi06HfstKxq+wCGlssvMUdgVIzNq2ZXa5uzmswN2mibee5wIyB3VYs0JNXQizMJmZuhU+aiUFkV+kb5A==",
"dependencies": {
"Microsoft.VisualStudio.Threading.Analyzers": "17.1.42-alpha",
"Microsoft.VisualStudio.Workspace": "17.1.11-preview-0002",
"Microsoft.VisualStudio.Workspace.Extensions": "17.1.11-preview-0002"
}
},
"Nerdbank.GitVersioning": {
"type": "Direct",
"requested": "[3.5.119, )",
Expand Down Expand Up @@ -737,16 +754,6 @@
"Microsoft.VisualStudio.Workspace": "17.1.11-preview-0002"
}
},
"Microsoft.VisualStudio.Workspace.VSIntegration": {
"type": "Transitive",
"resolved": "17.1.11-preview-0002",
"contentHash": "gZ74u5Qi06HfstKxq+wCGlssvMUdgVIzNq2ZXa5uzmswN2mibee5wIyB3VYs0JNXQizMJmZuhU+aiUFkV+kb5A==",
"dependencies": {
"Microsoft.VisualStudio.Threading.Analyzers": "17.1.42-alpha",
"Microsoft.VisualStudio.Workspace": "17.1.11-preview-0002",
"Microsoft.VisualStudio.Workspace.Extensions": "17.1.11-preview-0002"
}
},
"Microsoft.Win32.Registry": {
"type": "Transitive",
"resolved": "5.0.0",
Expand Down Expand Up @@ -1078,7 +1085,7 @@
"Microsoft.VisualStudio.Shell.Interop": "[17.2.32505.113, )",
"Microsoft.VisualStudio.Threading": "[17.2.32, )",
"Microsoft.VisualStudio.Utilities": "[17.2.32505.113, )",
"Microsoft.VisualStudio.Workspace.VSIntegration": "[16.3.43, )",
"Microsoft.VisualStudio.Workspace.VSIntegration": "[17.1.11-preview-0002, )",
"Microsoft.Visualstudio.Telemetry": "[16.5.6, )",
"OmniSharp.Extensions.LanguageServer": "[0.19.6, )"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.5.0-2.final" PrivateAssets="all" />
<PackageReference Include="Microsoft.VisualStudio.LanguageServer.Protocol" Version="17.2.8" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.2.32" />
<PackageReference Include="Microsoft.VisualStudio.Utilities" Version="17.2.32505.113" />
Expand Down
Loading

0 comments on commit 16c176b

Please sign in to comment.