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

Commit c889b63

Browse files
authored
Merge branch 'master' into StaticReviewFileMap
2 parents b1ad011 + 29c95b8 commit c889b63

113 files changed

Lines changed: 400 additions & 187 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,22 @@ Logs can be viewed at the following location:
9292

9393
`%LOCALAPPDATA%\GitHubVisualStudio\extension.log`
9494

95+
## Troubleshooting
96+
97+
If you have issues building with failures similar to:
98+
99+
> "The type or namespace name does not exist..."
100+
101+
or
102+
103+
> "Unable to find project... Check that the project reference is valid and that the project file exists."*
104+
105+
Close Visual Studio and run the following command to update submodules and clean your environment.
106+
107+
```txt
108+
clean.cmd
109+
```
110+
95111
## More information
96112
- Andreia Gaita's [presentation](https://www.youtube.com/watch?v=hz2hCO8e_8w) at Codemania 2016 about this extension.
97113

@@ -104,4 +120,3 @@ Visit the [Contributor Guidelines](CONTRIBUTING.md) for details on how to contri
104120
Copyright 2015 - 2018 GitHub, Inc.
105121

106122
Licensed under the [MIT License](LICENSE.md)
107-

clean.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
git submodule update --init
2+
git clean -xdff
3+
git submodule foreach git clean -xdff

src/CredentialManagement/NativeMethods.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
using System.Text;
55
using Microsoft.Win32.SafeHandles;
66

7+
#pragma warning disable CA1034 // Nested types should not be visible
8+
#pragma warning disable CA1051 // Do not declare visible instance fields
9+
#pragma warning disable CA1707 // Identifiers should not contain underscores
10+
711
namespace GitHub.Authentication.CredentialManagement
812
{
913
public static class NativeMethods
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This file is used by Code Analysis to maintain SuppressMessage
2+
// attributes that are applied to this project.
3+
// Project-level suppressions either have no target or are given
4+
// a specific target and scoped to a namespace, type, member, etc.
5+
6+
using System.Diagnostics.CodeAnalysis;
7+
8+
[assembly: SuppressMessage("Reliability", "CA2007:Do not directly await a Task", Justification = "Discouraged for VSSDK projects.")]
9+

src/GitHub.Api/LoginManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ async Task<ApplicationAuthorization> HandleTwoFactorAuthorization(
289289
}
290290
}
291291

292-
ApplicationAuthorization EnsureNonNullAuthorization(ApplicationAuthorization auth)
292+
static ApplicationAuthorization EnsureNonNullAuthorization(ApplicationAuthorization auth)
293293
{
294294
// If a mock IGitHubClient is not set up correctly, it can return null from
295295
// IGutHubClient.Authorization.Create - this will cause an infinite loop in Login()

src/GitHub.App/Api/ApiClient.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ namespace GitHub.Api
1818
{
1919
public partial class ApiClient : IApiClient
2020
{
21-
const string ScopesHeader = "X-OAuth-Scopes";
2221
const string ProductName = Info.ApplicationInfo.ApplicationDescription;
2322
static readonly ILogger log = LogManager.ForContext<ApiClient>();
2423

src/GitHub.App/Collections/VirtualizingList.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
using GitHub.Logging;
1313
using Serilog;
1414

15+
#pragma warning disable CA1010 // Collections should implement generic interface
16+
#pragma warning disable CA1033 // Interface methods should be callable by child types
17+
#pragma warning disable CA1710 // Identifiers should have correct suffix
18+
1519
namespace GitHub.Collections
1620
{
1721
/// <summary>

src/GitHub.App/Collections/VirtualizingListCollectionView.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
using System.Collections.Specialized;
55
using System.Windows.Data;
66

7+
#pragma warning disable CA1010 // Collections should implement generic interface
8+
#pragma warning disable CA1033 // Interface methods should be callable by child types
9+
#pragma warning disable CA1710 // Identifiers should have correct suffix
10+
711
namespace GitHub.Collections
812
{
913
/// <summary>
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
using System.Diagnostics.CodeAnalysis;
2-
3-
[assembly: SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Scope = "member", Target = "GitHub.ViewModels.CreateRepoViewModel.#ResetState()")]
4-
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Git", Scope = "resource", Target = "GitHub.Resources.resources")]
5-
[assembly: SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Scope = "member", Target = "GitHub.Caches.CredentialCache.#InsertObject`1(System.String,!!0,System.Nullable`1<System.DateTimeOffset>)")]
6-
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Git", Scope = "resource", Target = "GitHub.App.Resources.resources")]
7-
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String)")]
8-
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String,System.Text.Encoding)")]
9-
101
// This file is used by Code Analysis to maintain SuppressMessage
112
// attributes that are applied to this project.
123
// Project-level suppressions either have no target or are given
@@ -16,3 +7,15 @@
167
// Code Analysis results, point to "Suppress Message", and click
178
// "In Suppression File".
189
// You do not need to add suppressions to this file manually.
10+
11+
using System.Diagnostics.CodeAnalysis;
12+
13+
[assembly: SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Scope = "member", Target = "GitHub.ViewModels.CreateRepoViewModel.#ResetState()")]
14+
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Git", Scope = "resource", Target = "GitHub.Resources.resources")]
15+
[assembly: SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Scope = "member", Target = "GitHub.Caches.CredentialCache.#InsertObject`1(System.String,!!0,System.Nullable`1<System.DateTimeOffset>)")]
16+
[assembly: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "Git", Scope = "resource", Target = "GitHub.App.Resources.resources")]
17+
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String)")]
18+
[assembly: SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", Scope = "member", Target = "GitHub.Services.PullRequestService.#CreateTempFile(System.String,System.String,System.String,System.Text.Encoding)")]
19+
[assembly: SuppressMessage("Design", "CA1056:Uri properties should not be strings")]
20+
[assembly: SuppressMessage("Design", "CA1054:Uri parameters should not be strings")]
21+
[assembly: SuppressMessage("Reliability", "CA2007:Do not directly await a Task", Justification = "Discouraged for VSSDK projects.")]

src/GitHub.App/Services/EnterpriseCapabilitiesService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public async Task<EnterpriseLoginMethods> ProbeLoginMethods(Uri enterpriseBaseUr
5555
}
5656
}
5757

58-
private async Task<EnterpriseMeta> GetMetadata(IConnection connection)
58+
private static async Task<EnterpriseMeta> GetMetadata(IConnection connection)
5959
{
6060
var endpoint = new Uri("meta", UriKind.Relative);
6161
var response = await connection.Get<EnterpriseMeta>(endpoint, null, null).ConfigureAwait(false);

0 commit comments

Comments
 (0)