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

MMF-4090 Feature/dotnet analyzer repackaging #5851

Merged
merged 29 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6dc02a1
SLVS-1501 Remove embedded dotnet analyzer declaration from VSIX manif…
georgii-borovinskikh-sonarsource Oct 14, 2024
521c41c
SLVS-1519 Update Microsoft.CodeAnalysis to 3.11, add a reference to i…
georgii-borovinskikh-sonarsource Oct 15, 2024
af0bbe5
SLVS-1510 Add IEmbeddedRoslynAnalyzerProvider & IConnectedModeRoslynA…
georgii-borovinskikh-sonarsource Oct 16, 2024
0ad0e87
SLVS-1516 Create IAnalyzerAssemblyLoaderFactory interface to abstract…
gabriela-trutan-sonarsource Oct 16, 2024
946693e
SLVS-1514 Put embedded sonar dotnet analyzers in a subfolder within v…
gabriela-trutan-sonarsource Oct 17, 2024
0adb033
SLVS-1526 Update LanguageServices to 3.11, reference it in Infrastruc…
georgii-borovinskikh-sonarsource Oct 17, 2024
5ae7805
SLVS-1524 Add Solution name tracking to ActiveSolutionTracker (#5756)
georgii-borovinskikh-sonarsource Oct 18, 2024
e95db7d
SLVS-1517 Implement IEmbeddedAnalyzerProvider (#5757)
gabriela-trutan-sonarsource Oct 21, 2024
eeddf32
SLVS-1513 Implement IAnalyzerAssemblyLoader (#5764)
gabriela-trutan-sonarsource Oct 21, 2024
a91306c
SLVS-1531 Add a basic implementation of the IConnectedModeRoslynAnaly…
gabriela-trutan-sonarsource Oct 21, 2024
1cc7a40
SLVS-1529 Cache analyzerAssemblyLoader (#5765)
gabriela-trutan-sonarsource Oct 21, 2024
19d71f3
SLVS-1511 Implement solution analyzer management (#5763)
georgii-borovinskikh-sonarsource Oct 21, 2024
049b1bf
SLVS-1535 Add AnalyzerArrayComparer (#5766)
georgii-borovinskikh-sonarsource Oct 22, 2024
bca0a57
SLVS-1536 Add IRoslynWorkspaceWrapper & IRoslynSolutionWrapper implem…
georgii-borovinskikh-sonarsource Oct 22, 2024
928f234
SLVS-1537 Add ISolutionRoslynAnalyzerManager integration to ActiveSol…
georgii-borovinskikh-sonarsource Oct 22, 2024
f74d0d9
SLVS-1550 Fix exception when connecting to SQ (#5772)
gabriela-trutan-sonarsource Oct 25, 2024
e4ec49d
SLVS-1543 Add shouldUseEnterpriseCSharpAnalyzer SlCore RPC method (#5…
gabriela-trutan-sonarsource Oct 25, 2024
6b6edd0
SLVS-1556 Fix analyzers not loaded (#5778)
gabriela-trutan-sonarsource Oct 25, 2024
8e8c848
SLVS-1557 Fix analyzers being replaced rather than added (#5779)
georgii-borovinskikh-sonarsource Oct 28, 2024
caa49e2
SLVS-1553 Update IConnectedModeRoslynAnalyzerProvider.GetOrNull metho…
gabriela-trutan-sonarsource Oct 28, 2024
fdaff6d
SLVS-1562 Refactor ActiveConfigScopeTrackerTests to use Nsubstitute (…
gabriela-trutan-sonarsource Oct 29, 2024
6980db7
SLVS-1564 Move IActiveConfigScopeTracker inside Core assembly. (#5784)
gabriela-trutan-sonarsource Oct 30, 2024
008d82a
SLVS-1558 Refactor SolutionRoslynAnalyzerManager (#5788)
gabriela-trutan-sonarsource Oct 31, 2024
77c8364
SLVS-1559 Embed Enterprise dotnet analyzer (#5787)
georgii-borovinskikh-sonarsource Oct 31, 2024
6eeb3c6
SLVS-1571 Create IConfigurationScopeDotnetAnalyzerIndicator SLCore wr…
georgii-borovinskikh-sonarsource Nov 1, 2024
0dbdd2c
SLVS-1518 Implement IConnectedModeAnalyzerProvider (#5792)
georgii-borovinskikh-sonarsource Nov 1, 2024
e9a8fd0
SLVS-1547 Add notice to LGPL license regarding C# analyzer (#5789)
vnaskos-sonar Nov 8, 2024
e6fedf9
SLVS-1657 Fix unit tests after rebase (#5852)
georgii-borovinskikh-sonarsource Nov 26, 2024
8d6ce74
Update Sonar Dotnet to 10.3.0.106239
georgii-borovinskikh-sonarsource Nov 26, 2024
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ UnitTestResults.html
# Visual Studio temp directories
.vs/

# Rider temp directories
.idea/

# Visual C++ cache files
ipch/
*.aps
Expand Down Expand Up @@ -170,4 +173,5 @@ $RECYCLE.BIN/
/**/launchSettings.json
/src/Rules/Embedded
/src/Integration.Vsix/DownloadedJars
/src/Integration.Vsix/Sloop
/src/Integration.Vsix/Sloop
/src/Integration.Vsix/EmbeddedDotnetAnalyzerDLLs
18 changes: 18 additions & 0 deletions THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@ https://github.com/SonarSource/sonarlint-visualstudio

The attached notices are provided for information only.

License notice for Sonar C# and VB .NET Enterprise Plugins
----------------------------------------------------------

Copyright (C) 2012-2024 SonarSource SA
All rights reserved.
mailto:info AT sonarsource DOT com

This software includes the sonar-csharp-enterprise-plugin and sonar-vbnet-enterprise-plugin,
a proprietary plugin owned by SonarSource SA. These plugins are embedded within this software
and are only licensed for use as an integrated part of this application.

Users of this software are granted a non-transferable, non-sublicensable, limited license
to use the aforementioned plugins solely as part of this application. Any use, reproduction,
distribution, or modification of the plugin outside the scope of this application is
strictly prohibited.



License notice for Visual Studio Image Library (used for the UI)
----------------------------------------------------------------

Expand Down
15 changes: 13 additions & 2 deletions build/CopyDependencies/CopyDependencies.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
<Target Name="Build">
<CallTarget Targets="ClearDirs" />
<CallTarget Targets="CopyJars" />
<CallTarget Targets="CopyEnterpriseDotnet" />
<CallTarget Targets="CopySloop" />
</Target>

<PropertyGroup>
<VsixDir>..\..\src\Integration.Vsix</VsixDir>
<EnterpriseDotnetAnalyzersExtractDir>$(LOCALAPPDATA)\SLVS_Build_Dotnet\EnterpriseAnalyzerDlls-$(EmbeddedSonarAnalyzerVersion)</EnterpriseDotnetAnalyzersExtractDir>
<EmbeddedEnterpriseDotnetAnalyzersDir>$(VsixDir)\EmbeddedDotnetAnalyzerDLLs</EmbeddedEnterpriseDotnetAnalyzersDir>
<JarDownloadDir>$(LOCALAPPDATA)\SLVS_Build_DownloadedJars</JarDownloadDir>
<EmbeddedJarDir>$(VsixDir)\DownloadedJars</EmbeddedJarDir>
<SloopDowloadDir>$(LOCALAPPDATA)\SLVS_Build_SLOOP\sonarlint-backend-cli-$(EmbeddedSloopVersion)-windows_x64</SloopDowloadDir>
Expand All @@ -19,18 +22,26 @@
<Target Name="ClearDirs">
<RemoveDir Directories="$(EmbeddedJarDir)" />
<RemoveDir Directories="$(EmbeddedSloopDir)" />
<RemoveDir Directories="$(EmbeddedEnterpriseDotnetAnalyzersDir)" />
</Target>

<Target Name="CopyJars">
<ItemGroup>
<SourceJars Include="$(JarDownloadDir)\sonar-cfamily-plugin-$(EmbeddedSonarCFamilyAnalyzerVersion).jar" />
<SourceJars Include="$(JarDownloadDir)\sonar-csharp-plugin-$(EmbeddedSonarAnalyzerVersion).jar" />
<SourceJars Include="$(JarDownloadDir)\sonar-vbnet-plugin-$(EmbeddedSonarAnalyzerVersion).jar" />
<SourceJars Include="$(JarDownloadDir)\sonar-csharp-enterprise-plugin-$(EmbeddedSonarAnalyzerVersion).jar" />
<SourceJars Include="$(JarDownloadDir)\sonar-vbnet-enterprise-plugin-$(EmbeddedSonarAnalyzerVersion).jar" />
<SourceJars Include="$(JarDownloadDir)\sonar-javascript-plugin-$(EmbeddedSonarJSAnalyzerVersion).jar" />
<SourceJars Include="$(JarDownloadDir)\sonar-text-plugin-$(EmbeddedSonarSecretsJarVersion).jar" />
</ItemGroup>
<Copy SourceFiles ="@(SourceJars)" DestinationFolder="$(EmbeddedJarDir)" />
</Target>

<Target Name="CopyEnterpriseDotnet">
<ItemGroup>
<EnterpriseDotnetSource Include="$(EnterpriseDotnetAnalyzersExtractDir)\*.dll" />
</ItemGroup>
<Copy SourceFiles="@(EnterpriseDotnetSource)" DestinationFolder="$(EmbeddedEnterpriseDotnetAnalyzersDir)"/>
</Target>

<Target Name="CopySloop">
<ItemGroup>
Expand Down
33 changes: 19 additions & 14 deletions build/DownloadDependencies/CommonProperties.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@
<LanguageKey>c</LanguageKey>
<RepoKey>c</RepoKey>
</PluginJars>

<PluginJars Include="C#">
<JarName>sonar-csharp-plugin-$(EmbeddedSonarAnalyzerVersion).jar</JarName>
<URL>https://binaries.sonarsource.com/Distribution/sonar-csharp-plugin/%(JarName)</URL>
<LanguageKey>cs</LanguageKey>
<RepoKey>csharpsquid</RepoKey>
</PluginJars>

<PluginJars Include="VB.NET">
<JarName>sonar-vbnet-plugin-$(EmbeddedSonarAnalyzerVersion).jar</JarName>
<URL>https://binaries.sonarsource.com/Distribution/sonar-vbnet-plugin/%(JarName)</URL>
<LanguageKey>vbnet</LanguageKey>
<RepoKey>vbnet</RepoKey>
</PluginJars>
</ItemGroup>

<PropertyGroup>
Expand All @@ -66,4 +52,23 @@
<SonarTextPluginDownloadPath>$(JarDownloadDir)\$(SonarTextPluginFileName)</SonarTextPluginDownloadPath>
<SonarTextPluginRemoteUrl>https://repox.jfrog.io/artifactory/sonarsource/org/sonarsource/text/sonar-text-plugin/$(EmbeddedSonarSecretsJarVersion)/$(SonarTextPluginFileName)</SonarTextPluginRemoteUrl>
</PropertyGroup>

<PropertyGroup>
<DotnetPluginsExtractDir>$(LOCALAPPDATA)\SLVS_Build_Dotnet</DotnetPluginsExtractDir>
<EnterpriseDotnetAnalyzersExtractDir>$(LOCALAPPDATA)\SLVS_Build_Dotnet\EnterpriseAnalyzerDlls-$(EmbeddedSonarAnalyzerVersion)</EnterpriseDotnetAnalyzersExtractDir>
</PropertyGroup>

<PropertyGroup>
<EnterpriseSonarVBNetPluginFileNameWithoutExtension>sonar-vbnet-enterprise-plugin-$(EmbeddedSonarAnalyzerVersion)</EnterpriseSonarVBNetPluginFileNameWithoutExtension>
<EnterpriseSonarVBNetPluginFileName>$(EnterpriseSonarVBNetPluginFileNameWithoutExtension).jar</EnterpriseSonarVBNetPluginFileName>
<EnterpriseSonarVBNetPluginDownloadPath>$(JarDownloadDir)\$(EnterpriseSonarVBNetPluginFileName)</EnterpriseSonarVBNetPluginDownloadPath>
<EnterpriseSonarVBNetPluginRemoteUrl>https://repox.jfrog.io/artifactory/sonarsource/com/sonarsource/dotnet/sonar-vbnet-enterprise-plugin/$(EmbeddedSonarAnalyzerVersion)/$(EnterpriseSonarVBNetPluginFileName)</EnterpriseSonarVBNetPluginRemoteUrl>
</PropertyGroup>

<PropertyGroup>
<EnterpriseSonarCSharpPluginFileNameWithoutExtension>sonar-csharp-enterprise-plugin-$(EmbeddedSonarAnalyzerVersion)</EnterpriseSonarCSharpPluginFileNameWithoutExtension>
<EnterpriseSonarCSharpPluginFileName>$(EnterpriseSonarCSharpPluginFileNameWithoutExtension).jar</EnterpriseSonarCSharpPluginFileName>
<EnterpriseSonarCSharpPluginDownloadPath>$(JarDownloadDir)\$(EnterpriseSonarCSharpPluginFileName)</EnterpriseSonarCSharpPluginDownloadPath>
<EnterpriseSonarCSharpPluginRemoteUrl>https://repox.jfrog.io/artifactory/sonarsource/com/sonarsource/dotnet/sonar-csharp-enterprise-plugin/$(EmbeddedSonarAnalyzerVersion)/$(EnterpriseSonarCSharpPluginFileName)</EnterpriseSonarCSharpPluginRemoteUrl>
</PropertyGroup>
</Project>
14 changes: 14 additions & 0 deletions build/DownloadDependencies/JarProcessing.targets
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
<CallTarget Targets="PrepareDirectories" />
<CallTarget Targets="DownloadIndividualJars" />
<CallTarget Targets="DownloadRepoxJars" />
<CallTarget Targets="UnzipEnterpriseSonarCSharp" />
<CallTarget Targets="UnzipEnterpriseSonarVBNet" />
<CallTarget Targets="DownloadSloop" />
<CallTarget Targets="UnzipSloop" />
<CallTarget Targets="WriteOutputFile" />
Expand All @@ -48,6 +50,8 @@
<Target Name="DownloadRepoxJars">
<Exec Command="curl -u$(ARTIFACTORY_USER):$(ARTIFACTORY_PASSWORD) --ssl-no-revoke -C - --create-dirs --output $(JavaScriptPluginDownloadPath) --url $(JavascriptPluginRemoteUrl)" />
<Exec Command="curl -u$(ARTIFACTORY_USER):$(ARTIFACTORY_PASSWORD) --ssl-no-revoke -C - --create-dirs --output $(SonarTextPluginDownloadPath) --url $(SonarTextPluginRemoteUrl)" />
<Exec Command="curl -u$(ARTIFACTORY_USER):$(ARTIFACTORY_PASSWORD) --ssl-no-revoke -C - --create-dirs --output $(EnterpriseSonarCSharpPluginDownloadPath) --url $(EnterpriseSonarCSharpPluginRemoteUrl)" />
<Exec Command="curl -u$(ARTIFACTORY_USER):$(ARTIFACTORY_PASSWORD) --ssl-no-revoke -C - --create-dirs --output $(EnterpriseSonarVBNetPluginDownloadPath) --url $(EnterpriseSonarVBNetPluginRemoteUrl)" />
</Target>

<Target Name ="DownloadSloop">
Expand All @@ -58,6 +62,16 @@
<Unzip SourceFiles="$(SloopBinaryDownloadPath)" DestinationFolder="$(SloopExtractDir)" OverwriteReadOnlyFiles="true" />
</Target>

<Target Name="UnzipEnterpriseSonarCSharp">
<Unzip SourceFiles="$(EnterpriseSonarCSharpPluginDownloadPath)" DestinationFolder="$(DotnetPluginsExtractDir)\$(EnterpriseSonarCSharpPluginFileNameWithoutExtension)" OverwriteReadOnlyFiles="true" />
<Unzip SourceFiles="$(DotnetPluginsExtractDir)\$(EnterpriseSonarCSharpPluginFileNameWithoutExtension)\static\SonarAnalyzer-$(EmbeddedSonarAnalyzerVersion).zip" DestinationFolder="$(EnterpriseDotnetAnalyzersExtractDir)" OverwriteReadOnlyFiles="true" />
</Target>

<Target Name="UnzipEnterpriseSonarVBNet">
<Unzip SourceFiles="$(EnterpriseSonarVBNetPluginDownloadPath)" DestinationFolder="$(DotnetPluginsExtractDir)\$(EnterpriseSonarVBNetPluginFileNameWithoutExtension)" OverwriteReadOnlyFiles="true" />
<Unzip SourceFiles="$(DotnetPluginsExtractDir)\$(EnterpriseSonarVBNetPluginFileNameWithoutExtension)\static\SonarAnalyzer-$(EmbeddedSonarAnalyzerVersion).zip" DestinationFolder="$(EnterpriseDotnetAnalyzersExtractDir)" OverwriteReadOnlyFiles="true" />
</Target>

<Target Name="WriteOutputFile">
<!-- The timestamp on the output file is used by MSBuild to decide whether to build this project or not.
If the timestamp on the EmbeddedSonarAnalyzer.props file is later than that of the output file then
Expand Down
Loading