Skip to content

Commit 8eae432

Browse files
authored
CM-60844: fix some warnings and upgrade build scripts (#51)
1 parent de873fe commit 8eae432

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

.github/workflows/lint_build_publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ jobs:
1010
runs-on: windows-latest
1111
steps:
1212
- name: Checkout repository
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v6
1414

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

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

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

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

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

5454
- name: Upload Cycode.VisualStudio.Extension.17.0 artifact
55-
uses: actions/upload-artifact@v4
55+
uses: actions/upload-artifact@v7
5656
with:
5757
name: Cycode.VisualStudio.Extension.17.0
5858
if-no-files-found: error
@@ -106,7 +106,7 @@ jobs:
106106
name: Smoke test (${{ matrix.vs-name }})
107107
steps:
108108
- name: Download Cycode.VisualStudio.Extension.17.0 artifact
109-
uses: actions/download-artifact@v4
109+
uses: actions/download-artifact@v8
110110
with:
111111
name: Cycode.VisualStudio.Extension.17.0
112112

src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/AiRemediationResult.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using Newtonsoft.Json;
22

3+
#nullable enable
4+
35
namespace Cycode.VisualStudio.Extension.Shared.Cli.DTO;
46

57
public class AiRemediationResult {

src/extension/Cycode.VisualStudio.Extension.Shared/Cli/DTO/StatusResult.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using Newtonsoft.Json;
22

3+
#nullable enable
4+
35
namespace Cycode.VisualStudio.Extension.Shared.Cli.DTO;
46

57
public class StatusResult {

src/extension/Cycode.VisualStudio.Extension.Shared/Components/TreeView/Nodes/FileNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
namespace Cycode.VisualStudio.Extension.Shared.Components.TreeView.Nodes;
44

55
public class FileNode : BaseNode {
6-
public BitmapSource Icon { get; set; }
6+
public new BitmapSource Icon { get; set; }
77
}

src/extension/Cycode.VisualStudio.Extension.Shared/Components/ViolationCards/SastViolationCardControl.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<t:FieldValue Grid.Row="4" Grid.Column="1" x:Name="Subcategory" />
4040

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

4444
<t:FieldName Grid.Row="6" Grid.Column="0" Text="Security Tool:" />
4545
<t:FieldValue Grid.Row="6" Grid.Column="1" x:Name="SecurityTool" />

src/extension/Cycode.VisualStudio.Extension.Shared/Components/ViolationCards/SastViolationCardControl.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public SastViolationCardControl(SastDetection detection) {
3535

3636
File.Text = detection.DetectionDetails.FileName;
3737
Subcategory.Text = detection.DetectionDetails.Category;
38-
Language.Text = string.Join(", ", detection.DetectionDetails.Languages);
38+
LanguageValue.Text = string.Join(", ", detection.DetectionDetails.Languages);
3939

4040
Dictionary<string, string> engineIdToDisplayName = new() {
4141
{ "5db84696-88dc-11ec-a8a3-0242ac120002", "Semgrep OSS (Orchestrated by Cycode)" },

src/extension/Cycode.VisualStudio.Extension.Shared/Services/SuggestedActions/SuggestedActionsSource.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ CancellationToken cancellationToken
4141
};
4242
}
4343

44-
public async Task<bool> HasSuggestedActionsAsync(
44+
public Task<bool> HasSuggestedActionsAsync(
4545
ISuggestedActionCategorySet requestedActionCategories,
4646
SnapshotSpan range,
4747
CancellationToken cancellationToken
4848
) {
49-
if (TryUpdateTagger() == false) return false;
49+
if (TryUpdateTagger() == false) return Task.FromResult(false);
5050

51-
return _tagger.GetErrorTags(range).Count > 0;
51+
return Task.FromResult(_tagger.GetErrorTags(range).Count > 0);
5252
}
5353

5454
public event EventHandler<EventArgs> SuggestedActionsChanged;

0 commit comments

Comments
 (0)