Skip to content

Commit e0152e8

Browse files
committed
Cleanup Build
1 parent 7d21ada commit e0152e8

File tree

48 files changed

+357
-167
lines changed

Some content is hidden

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

48 files changed

+357
-167
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ dotnet_style_require_accessibility_modifiers = always
9797

9898
# Public API
9999
dotnet_diagnostic.rs0016.severity = warning
100+
dotnet_diagnostic.rcs1194.severity = none
100101

101102
# Require braces on all control statements
102103
resharper_braces_for_for = required

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,5 @@
1313
"*.targets": "xml",
1414
"*.tasks": "xml"
1515
},
16-
"cSpell.words": [
17-
"Nats"
18-
],
1916
"dotnet.defaultSolution": "src/All.sln"
2017
}

.vscode/tasks.json

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,53 @@
1717
}
1818
},
1919
{
20-
"label": "Build entire repository (Debug)",
20+
"label": "Build src/All.sln",
2121
"command": "dotnet",
2222
"type": "shell",
2323
"args": [
2424
"build",
2525
"src/All.sln",
26-
// Ask dotnet build to generate full paths for file names.
2726
"/property:GenerateFullPaths=true",
28-
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
29-
"/consoleloggerparameters:NoSummary",
27+
"/consoleloggerparameters:NoSummary"
3028
],
3129
"group": "build",
3230
"presentation": {
3331
"reveal": "silent"
3432
},
3533
"problemMatcher": "$msCompile"
36-
}
34+
},
35+
{
36+
"label": "Build src/HotChocolate/Core/HotChocolate.Core.sln",
37+
"command": "dotnet",
38+
"type": "shell",
39+
"args": [
40+
"build",
41+
"src/HotChocolate/Core/HotChocolate.Core.sln",
42+
"/property:GenerateFullPaths=true",
43+
"/consoleloggerparameters:NoSummary"
44+
],
45+
"group": "build",
46+
"presentation": {
47+
"reveal": "silent"
48+
},
49+
"problemMatcher": "$msCompile"
50+
},
51+
{
52+
"label": "Test src/All.sln",
53+
"command": "dotnet",
54+
"type": "shell",
55+
"args": [
56+
"test",
57+
"src/All.sln",
58+
"--verbosity q",
59+
"/property:GenerateFullPaths=true",
60+
"/consoleloggerparameters:NoSummary"
61+
],
62+
"group": "build",
63+
"presentation": {
64+
"reveal": "silent"
65+
},
66+
"problemMatcher": "$msCompile"
67+
},
3768
]
3869
}

src/Directory.Build.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,10 @@
6464
<None Include="$(MSBuildThisFileDirectory)..\LICEN*" Pack="true" PackagePath="" Visible="false" />
6565
</ItemGroup>
6666

67+
<ItemGroup Condition="'$(Configuration)' == 'debug'">
68+
<PackageReference Include="Roslynator.Analyzers" Version="4.12.3" />
69+
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers" Version="4.12.3" />
70+
<PackageReference Include="Roslynator.Formatting.Analyzers" Version="4.12.3" />
71+
</ItemGroup>
72+
6773
</Project>

src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ComposeDirectiveTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Threading.Tasks;
23
using CookieCrumble;
34
using HotChocolate.ApolloFederation.Types;
@@ -45,6 +46,7 @@ public class Address
4546
[DirectiveType(DirectiveLocation.FieldDefinition)]
4647
public sealed class Custom;
4748

49+
[AttributeUsage(AttributeTargets.All, AllowMultiple = false)]
4850
public sealed class CustomDirectiveAttribute()
4951
: DirectiveAttribute<Custom>(new Custom());
5052
}

src/HotChocolate/AspNetCore/test/AspNetCore.Tests/Extensions/ServiceCollectionExtensionTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Microsoft.Extensions.DependencyInjection;
44

5-
public class ServiceCollectionExtensionTests
5+
public static class ServiceCollectionExtensionTests
66
{
77
[Fact]
88
public static void AddHttpRequestSerializer_OfT()

src/HotChocolate/Caching/src/Caching/CacheControlAttribute.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public CacheControlAttribute()
2323
{
2424
}
2525

26+
/// <summary>
27+
/// Initializes a new instance of the <see cref="CacheControlAttribute"/> class with the specified maximum age.
28+
/// </summary>
2629
/// <param name="maxAge">
2730
/// The maximum time, in seconds, the resource can be cached.
2831
/// </param>

src/HotChocolate/Core/src/Abstractions/DiagnosticEventSourceAttribute.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace HotChocolate;
66
/// This attribute can be used by custom diagnostic event listeners
77
/// to specify the source to which a listener shall be bound to.
88
/// </summary>
9+
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
910
public class DiagnosticEventSourceAttribute : Attribute
1011
{
1112
/// <summary>

src/HotChocolate/Core/src/Abstractions/Execution/IExecutionResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ public interface IExecutionResult : IAsyncDisposable
3232
/// A cleanup task that will be executed when this result is disposed.
3333
/// </param>
3434
void RegisterForCleanup(Func<ValueTask> clean);
35-
}
35+
}

src/HotChocolate/Core/src/Execution/IRequestExecutor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.Threading;
43
using System.Threading.Tasks;
54

0 commit comments

Comments
 (0)