Skip to content
Merged
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
12 changes: 6 additions & 6 deletions .github/workflows/lint_build_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with:
vs-version: '[17.0, )'

- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x # dotnet 9 breaks "dotnet format" command: https://github.com/dotnet/sdk/issues/43017

- name: Format check
run: dotnet format --verify-no-changes --verbosity diagnostic

- uses: actions/cache@v4
- uses: actions/cache@v5
with:
path: ~/.nuget/packages
key: nuget-${{ hashFiles('**/*.csproj') }}
Expand All @@ -44,15 +44,15 @@ jobs:
DeployExtension: False

- name: Upload Cycode.VisualStudio.Extension.14.0-16.0 artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: Cycode.VisualStudio.Extension.14.0-16.0
if-no-files-found: error
# We don't use a wildcard pattern here because the path hierarchy is preserved
path: src/extension/Cycode.VisualStudio.Extension.14.0-16.0/bin/Release/Cycode.VisualStudio.Extension.14.0-16.0.vsix

- name: Upload Cycode.VisualStudio.Extension.17.0 artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: Cycode.VisualStudio.Extension.17.0
if-no-files-found: error
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
name: Smoke test (${{ matrix.vs-name }})
steps:
- name: Download Cycode.VisualStudio.Extension.17.0 artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: Cycode.VisualStudio.Extension.17.0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using Newtonsoft.Json;

#nullable enable

namespace Cycode.VisualStudio.Extension.Shared.Cli.DTO;

public class AiRemediationResult {
Expand All @@ -15,7 +17,7 @@

public class AiRemediationResultData {
[JsonProperty(Required = Required.Always)]
public string Remediation { get; set; }

Check warning on line 20 in src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/AiRemediationResult.cs

View workflow job for this annotation

GitHub Actions / lint_build_publish

Non-nullable property 'Remediation' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 20 in src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/AiRemediationResult.cs

View workflow job for this annotation

GitHub Actions / lint_build_publish

Non-nullable property 'Remediation' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

[JsonProperty(Required = Required.Always)]
public bool IsFixAvailable { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
using Newtonsoft.Json;

#nullable enable

namespace Cycode.VisualStudio.Extension.Shared.Cli.DTO;

public class StatusResult {
[JsonProperty(Required = Required.Always)]
public string Program { get; set; }

Check warning on line 9 in src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/StatusResult.cs

View workflow job for this annotation

GitHub Actions / lint_build_publish

Non-nullable property 'Program' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 9 in src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/StatusResult.cs

View workflow job for this annotation

GitHub Actions / lint_build_publish

Non-nullable property 'Program' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

[JsonProperty(Required = Required.Always)]
public string Version { get; set; }

Check warning on line 12 in src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/StatusResult.cs

View workflow job for this annotation

GitHub Actions / lint_build_publish

Non-nullable property 'Version' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 12 in src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/StatusResult.cs

View workflow job for this annotation

GitHub Actions / lint_build_publish

Non-nullable property 'Version' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

[JsonProperty(Required = Required.Always)]
public bool IsAuthenticated { get; set; }
Expand All @@ -19,7 +21,7 @@
public string? TenantId { get; set; }

[JsonProperty(Required = Required.Always)]
public SupportedModulesStatus SupportedModules { get; set; }

Check warning on line 24 in src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/StatusResult.cs

View workflow job for this annotation

GitHub Actions / lint_build_publish

Non-nullable property 'SupportedModules' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 24 in src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/StatusResult.cs

View workflow job for this annotation

GitHub Actions / lint_build_publish

Non-nullable property 'SupportedModules' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
}

public class SupportedModulesStatus {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
namespace Cycode.VisualStudio.Extension.Shared.Components.TreeView.Nodes;

public class FileNode : BaseNode {
public BitmapSource Icon { get; set; }
public new BitmapSource Icon { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<t:FieldValue Grid.Row="4" Grid.Column="1" x:Name="Subcategory" />

<t:FieldName Grid.Row="5" Grid.Column="0" Text="Language:" />
<t:FieldValue Grid.Row="5" Grid.Column="1" x:Name="Language" />
<t:FieldValue Grid.Row="5" Grid.Column="1" x:Name="LanguageValue" />

<t:FieldName Grid.Row="6" Grid.Column="0" Text="Security Tool:" />
<t:FieldValue Grid.Row="6" Grid.Column="1" x:Name="SecurityTool" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public SastViolationCardControl(SastDetection detection) {

File.Text = detection.DetectionDetails.FileName;
Subcategory.Text = detection.DetectionDetails.Category;
Language.Text = string.Join(", ", detection.DetectionDetails.Languages);
LanguageValue.Text = string.Join(", ", detection.DetectionDetails.Languages);

Dictionary<string, string> engineIdToDisplayName = new() {
{ "5db84696-88dc-11ec-a8a3-0242ac120002", "Semgrep OSS (Orchestrated by Cycode)" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ CancellationToken cancellationToken
};
}

public async Task<bool> HasSuggestedActionsAsync(
public Task<bool> HasSuggestedActionsAsync(
ISuggestedActionCategorySet requestedActionCategories,
SnapshotSpan range,
CancellationToken cancellationToken
) {
if (TryUpdateTagger() == false) return false;
if (TryUpdateTagger() == false) return Task.FromResult(false);

return _tagger.GetErrorTags(range).Count > 0;
return Task.FromResult(_tagger.GetErrorTags(range).Count > 0);
}

public event EventHandler<EventArgs> SuggestedActionsChanged;
Expand Down
Loading