Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lgtm issue #7775

Merged
merged 2 commits into from
Dec 21, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,8 @@ public async Task TestBuildWithXrefService()
StatusCode = HttpStatusCode.OK,
Content = new StringContent("[{'uid':'csharp_coding_standards', 'name':'C# Coding Standards', 'href':'http://dotnet.github.io/docfx/guideline/csharp_coding_standards.html'}]")
});

var httpClient = new HttpClient(fakeResponseHandler);
// this method only used for unit test.
TerryFei marked this conversation as resolved.
Show resolved Hide resolved
var httpClient = new HttpClient(fakeResponseHandler); // lgtm[cs/httpclient-checkcertrevlist-disabled]
var result = await new XrefServiceResolver(httpClient, ImmutableArray.Create("http://example.org/test1"), 1).ResolveAsync("xx");
Assert.Null(result);
result = await new XrefServiceResolver(httpClient, ImmutableArray.Create("http://example.org/test2|> removeHost |> addQueryString x y"), 1).ResolveAsync("xx");
Expand All @@ -1007,7 +1007,7 @@ public async Task TestBuildWithXrefService()
public async Task TestBuildWithXrefServiceRemoveHostWithParameters()
{
var fakeResponseHandler = new FakeResponseHandler();
var httpClient = new HttpClient(fakeResponseHandler);
var httpClient = new HttpClient(fakeResponseHandler); // lgtm[cs/httpclient-checkcertrevlist-disabled]

fakeResponseHandler.AddFakeResponse(new Uri("http://example.org/test1"), new HttpResponseMessage
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ protected virtual JsonSerializer GetSerializer()
{
new Newtonsoft.Json.Converters.StringEnumConverter(),
},
TypeNameHandling = TypeNameHandling.All,
TypeNameHandling = TypeNameHandling.All, // lgtm [cs/unsafe-type-name-handling]
TerryFei marked this conversation as resolved.
Show resolved Hide resolved
};
}

Expand Down