Skip to content

Commit

Permalink
refactor: remove Shared project and older versions support [IDE-518] (#…
Browse files Browse the repository at this point in the history
…287)

* chore: remove jobs for Snyk.VisualStudio.Extension build and deploy

* chore: delete shared proj

* refactor: rename namespace Snyk.VisualStudio.Extension.Shared to Snyk.VisualStudio.Extension

* chore: delete pre 2022 tests

* fix: namespaces after deleting shared

* chore: delete legacy readme

* fix: temporarily dont use main for ci

* fix: ensure .net 48 on all projects

* fix: tests added "Microsoft.VisualStudio.Sdk.TestFramework package
  • Loading branch information
ShawkyZ authored Jul 30, 2024
1 parent 2669c42 commit 034fbec
Show file tree
Hide file tree
Showing 239 changed files with 815 additions and 1,685 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ jobs:
- name: Calculate next semantic version Git tag (vsix version)
id: vsix_version
uses: ./.github/actions/next-git-tag
- name: Set VSIX version for 2015-2019
uses: cezarypiatek/[email protected]
with:
version: ${{ steps.vsix_version.outputs.next-tag }}
vsix-manifest-file: .\Snyk.VisualStudio.Extension\source.extension.vsixmanifest
- name: Set VSIX version for 2022
uses: cezarypiatek/[email protected]
with:
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,6 @@ on:
required: true

jobs:
test-vs19:
continue-on-error: true
runs-on: windows-2019
defaults:
run:
working-directory: ${{ github.workspace }}
env:
TEST_API_TOKEN: ${{ secrets.TEST_API_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
- name: Setup VSTest
uses: darenm/Setup-VSTest@v1
- name: Tests
run: vstest.console.exe **\bin\**\*Integration.Pre22.Tests.dll

test-vs22:
continue-on-error: true
runs-on: windows-2022
Expand Down
19 changes: 1 addition & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
working-directory: ${{ github.workspace }}
environment: snyk-msbuild-envs
env:
VsixManifestPath: .\Snyk.VisualStudio.Extension\source.extension.vsixmanifest
VsixManifestPath: .\Snyk.VisualStudio.Extension.2022\source.extension.vsixmanifest

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -79,16 +79,6 @@ jobs:
draft: false
prerelease: false

- name: Upload GitHub Release 2015-2019 Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: .\Snyk.VisualStudio.Extension\bin\Release\Snyk.VisualStudio.Extension.vsix
asset_name: Snyk_Vulnerability_Scanner-${{ needs.build-project.outputs.version }}.vsix
asset_content_type: application/zip

- name: Upload GitHub Release 2022 Asset
uses: actions/upload-release-asset@v1
env:
Expand All @@ -99,13 +89,6 @@ jobs:
asset_name: Snyk_Vulnerability_Scanner-${{ needs.build-project.outputs.version }}-2022.vsix
asset_content_type: application/zip

- name: Publish 2015-2019 extension to Marketplace
uses: cezarypiatek/[email protected]
with:
extension-file: '.\Snyk.VisualStudio.Extension\bin\Release\Snyk.VisualStudio.Extension.vsix'
publish-manifest-file: '.\Snyk.VisualStudio.Extension\vs-publish.json'
personal-access-code: ${{ secrets.VS_PUBLISHER_ACCESS_TOKEN }}

- name: Publish 2022 extension to Marketplace
uses: cezarypiatek/[email protected]
with:
Expand Down
77 changes: 0 additions & 77 deletions README-LEGACY.md

This file was deleted.

2 changes: 1 addition & 1 deletion Snyk.Code.Library.Tests/Snyk.Code.Library.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<TargetFramework>net48</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Snyk.Code.Library/Snyk.Code.Library.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Snyk.Code.Library</RootNamespace>
<AssemblyName>Snyk.Code.Library</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
Expand Down
2 changes: 1 addition & 1 deletion Snyk.Common.Tests/Service/SnykApiServiceTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.Tests
namespace Snyk.VisualStudio.Extension.Tests
{
using System;
using System.Net.Http;
Expand Down
2 changes: 1 addition & 1 deletion Snyk.Common.Tests/Snyk.Common.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<TargetFramework>net48</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.CLI
namespace Snyk.VisualStudio.Extension.CLI
{
using Newtonsoft.Json;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.CLI
namespace Snyk.VisualStudio.Extension.CLI
{
using System.Collections.Generic;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.CLI
namespace Snyk.VisualStudio.Extension.CLI
{
using System.Collections.Generic;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.CLI
namespace Snyk.VisualStudio.Extension.CLI
{
using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.CLI.Download
namespace Snyk.VisualStudio.Extension.CLI.Download
{
using System;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.CLI.Download
namespace Snyk.VisualStudio.Extension.CLI.Download
{
/// <summary>
/// Represents latest CLI release information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.CLI.Download
namespace Snyk.VisualStudio.Extension.CLI.Download
{
using System;
using System.Collections.Generic;
Expand All @@ -7,7 +7,7 @@
using System.Threading.Tasks;
using Serilog;
using Snyk.Common;
using Snyk.VisualStudio.Extension.Shared.Service;
using Snyk.VisualStudio.Extension.Service;

/// <summary>
/// Donwnload last Snyk CLI version.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.CLI
namespace Snyk.VisualStudio.Extension.CLI
{
/// <summary>
/// Vulnerability identifiers.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.CLI
namespace Snyk.VisualStudio.Extension.CLI
{
using System.Security.Authentication;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.CLI
namespace Snyk.VisualStudio.Extension.CLI
{
public interface ICliProvider
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.CLI
namespace Snyk.VisualStudio.Extension.CLI
{
using System;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Snyk.Common.Authentication;
using Snyk.Common.Service;
using Snyk.Common.Settings;
namespace Snyk.VisualStudio.Extension.Shared.CLI
namespace Snyk.VisualStudio.Extension.CLI
{
/// <summary>
/// Incapsulate work logic with Snyk CLI.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Snyk.Common.Settings;

namespace Snyk.VisualStudio.Extension.Shared.CLI
namespace Snyk.VisualStudio.Extension.CLI
{
using System;
using System.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.CLI
namespace Snyk.VisualStudio.Extension.CLI
{
using System;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.Cache
namespace Snyk.VisualStudio.Extension.Cache
{
using System.Collections.Generic;
using Microsoft.VisualStudio.Shell.Interop;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.Cache
namespace Snyk.VisualStudio.Extension.Cache
{
using System.Collections.Generic;
using Microsoft.VisualStudio.Shell.Interop;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace Snyk.VisualStudio.Extension.Shared.Cache
namespace Snyk.VisualStudio.Extension.Cache
{
using System;
using System.Collections.Generic;
using System.IO;
using Community.VisualStudio.Toolkit;
using Microsoft.VisualStudio.Shell.Interop;
using Snyk.VisualStudio.Extension.Shared.Service;
using Snyk.VisualStudio.Extension.Service;

/// <summary>
/// Impleemnts <see cref="IVsHierarchyEvents"/> for SnykCode cache.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.Commands
namespace Snyk.VisualStudio.Extension.Commands
{
using System;
using System.ComponentModel.Design;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace Snyk.VisualStudio.Extension.Shared.Commands
namespace Snyk.VisualStudio.Extension.Commands
{
using System;
using Microsoft.VisualStudio.Shell;
using Snyk.VisualStudio.Extension.Shared.CLI;
using Snyk.VisualStudio.Extension.CLI;

/// <summary>
/// Common class for <see cref="SnykScanCommand"/> and <see cref="SnykStopCurrentTaskCommand"/> task commands.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.Commands
namespace Snyk.VisualStudio.Extension.Commands
{
using System;
using System.ComponentModel.Design;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.Commands
namespace Snyk.VisualStudio.Extension.Commands
{
using System;
using System.ComponentModel.Design;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace Snyk.VisualStudio.Extension.Shared.Commands
namespace Snyk.VisualStudio.Extension.Commands
{
using System;
using System.ComponentModel.Design;
using Microsoft.VisualStudio.Shell;
using Snyk.VisualStudio.Extension.Shared.Service;
using Snyk.VisualStudio.Extension.Service;
using Task = System.Threading.Tasks.Task;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace Snyk.VisualStudio.Extension.Shared.Commands
namespace Snyk.VisualStudio.Extension.Commands
{
using System;
using System.ComponentModel.Design;
using Microsoft.VisualStudio.Shell;
using Snyk.VisualStudio.Extension.Shared.Service;
using Snyk.VisualStudio.Extension.Service;
using Task = System.Threading.Tasks.Task;

/// <summary>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared
namespace Snyk.VisualStudio.Extension
{
using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.Model
namespace Snyk.VisualStudio.Extension.Model
{
/// <summary>
/// Severity class.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.Service.Domain
namespace Snyk.VisualStudio.Extension.Service.Domain
{
/// <summary>
/// Settings for enabled/disabled features (OSS, SAST, Code quality and security).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace Snyk.VisualStudio.Extension.Shared.Service
namespace Snyk.VisualStudio.Extension.Service
{
using System.Threading;
using System.Threading.Tasks;
using Snyk.VisualStudio.Extension.Shared.CLI;
using Snyk.VisualStudio.Extension.CLI;

/// <summary>
/// Service for OSS vulnerability scan.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Snyk.VisualStudio.Extension.Shared.Service
namespace Snyk.VisualStudio.Extension.Service
{
using Task = System.Threading.Tasks.Task;

Expand Down
Loading

0 comments on commit 034fbec

Please sign in to comment.