Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 2e2bfdd

Browse files
committed
FIx/suppress CA errors.
1 parent 4d93b2a commit 2e2bfdd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/GitHub.VisualStudio/UI/GitHubPane.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.ComponentModel.Design;
3+
using System.Diagnostics.CodeAnalysis;
34
using System.Reactive.Linq;
45
using System.Runtime.InteropServices;
56
using GitHub.Extensions;
@@ -98,6 +99,7 @@ public void ShowView(ViewWithData data)
9899
View.ViewModel?.Initialize(data);
99100
}
100101

102+
[SuppressMessage("Microsoft.Design", "CA1061:DoNotHideBaseClassMethods", Justification = "WTF CA, I'm overriding!")]
101103
public override IVsSearchTask CreateSearch(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback)
102104
{
103105
var pane = View.ViewModel as IGitHubPaneViewModel;
@@ -124,9 +126,9 @@ public override void OnToolWindowCreated()
124126
{
125127
base.OnToolWindowCreated();
126128

127-
((IVsWindowFrame)Frame)?.SetProperty(
129+
Marshal.ThrowExceptionForHR(((IVsWindowFrame)Frame)?.SetProperty(
128130
(int)__VSFPROPID5.VSFPROPID_SearchPlacement,
129-
__VSSEARCHPLACEMENT.SP_STRETCH);
131+
__VSSEARCHPLACEMENT.SP_STRETCH) ?? 0);
130132
}
131133

132134
void UpdateSearchHost(bool enabled, string query)

0 commit comments

Comments
 (0)