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

V6/contrib #326

Closed
wants to merge 3 commits into from
Closed

V6/contrib #326

wants to merge 3 commits into from

Conversation

nikcio
Copy link
Owner

@nikcio nikcio commented Aug 29, 2024

No description provided.

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Health Quality Gates: OK

Change in average Code Health of affected files: -0.02 (9.74 -> 9.72)

  • Improving Code Health: 3 findings(s) ✅

View detailed results in CodeScene

Comment on lines -38 to -45
public async Task<TrackErrorStatusCodeResponse> TrackErrorStatusCodeAsync(
IResolverContext resolverContext,
[GraphQLDescription("Status code of the client error.")] int statusCode,
[GraphQLDescription("The URL that generated the client error.")] string url,
[GraphQLDescription("The time and date at which the client error was generated")] DateTime timestamp,
[GraphQLDescription("The URL from which the current URL is requested")] string? referrer)
{
ArgumentNullException.ThrowIfNull(resolverContext);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No longer an issue: Excess Number of Function Arguments
TrackErrorStatusCodeAsync is no longer above the threshold for number of arguments

Comment on lines -54 to -86
[InlineData("test-3", "https://example-site.com/not-found", "2024-05-30T14:10:20+01:00", "https://site-example.com/not-found", 404, true)]
public async Task UrlTrackerExampleQuery_TrackErrorStatusCode_Async(
string testCase,
string url,
string timeStamp,
string? referrer,
int statusCode,
bool expectSuccess)
{
var snapshotProvider = new SnapshotProvider($"{_urlTrackerExampleSnapshotPath}/TrackErrorStatusCode");
HttpClient client = _factory.CreateClient();

using var request = JsonContent.Create(new
{
query = UrlTrackerExampleQueries.TrackErrorStatusCode,
variables = new
{
url,
timeStamp,
referrer,
statusCode
}
});

HttpResponseMessage response = await client.PostAsync("/graphql", request).ConfigureAwait(true);

string responseContent = await response.Content.ReadAsStringAsync().ConfigureAwait(true);

string snapshotName = $"UrlTrackerExample_TrackErrorStatusCode_{testCase}.snap";

await snapshotProvider.AssertIsSnapshotEqualAsync(snapshotName, responseContent).ConfigureAwait(true);
Assert.Equal(expectSuccess, response.IsSuccessStatusCode);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No longer an issue: Excess Number of Function Arguments
UrlTrackerExampleQuery_TrackErrorStatusCode_Async is no longer above the threshold for number of arguments

@@ -257,74 +257,6 @@ ... on IMediaPickerEditorCulture {
__typename
}
}
... on IMediaPickerLegacyEditor {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Getting better: Lines of Declarations in a Single File
The lines of data declarations decreases from 3408 to 3136, threshold = 1500

@nikcio nikcio closed this Aug 29, 2024
Copy link

sonarcloud bot commented Aug 29, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant