Skip to content

Commit 6fbf4a7

Browse files
JoeRobichrenovate[bot]
authored andcommitted
Fix up warnings in nuke .build
1 parent f800bc2 commit 6fbf4a7

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

.build/Build.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88
using Nuke.Common.Tools.MSBuild;
99
using Rocket.Surgery.Nuke.DotNetCore;
1010

11+
namespace Build;
12+
1113
[PublicAPI]
12-
[CheckBuildProjectConfigurations]
1314
[UnsetVisualStudioEnvironmentVariables]
1415
[PackageIcon("http://www.omnisharp.net/images/logo.png")]
1516
[EnsureReadmeIsUpdated]
1617
[DotNetVerbosityMapping]
1718
[MSBuildVerbosityMapping]
1819
[NuGetVerbosityMapping]
19-
public partial class Solution : NukeBuild,
20+
public sealed partial class Solution : NukeBuild,
2021
ICanRestoreWithDotNetCore,
2122
ICanBuildWithDotNetCore,
2223
ICanTestWithDotNetCore,
@@ -36,10 +37,7 @@ public partial class Solution : NukeBuild,
3637
/// - Microsoft VisualStudio https://nuke.build/visualstudio
3738
/// - Microsoft VSCode https://nuke.build/vscode
3839
/// </summary>
39-
public static int Main()
40-
{
41-
return Execute<Solution>(x => x.Default);
42-
}
40+
public static int Main() => Execute<Solution>(x => x.Default);
4341

4442
[OptionalGitRepository] public GitRepository? GitRepository { get; }
4543

.build/Configuration.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
using System.ComponentModel;
22
using Nuke.Common.Tooling;
33

4+
namespace Build;
5+
46
[TypeConverter(typeof(TypeConverter<Configuration>))]
57
public class Configuration : Enumeration
68
{
7-
public static readonly Configuration Debug = new Configuration { Value = nameof(Debug) };
8-
public static readonly Configuration Release = new Configuration { Value = nameof(Release) };
9+
public static Configuration Debug => new() { Value = nameof(Debug) };
10+
public static Configuration Release => new() { Value = nameof(Release) };
911

1012
public static implicit operator string(Configuration configuration) => configuration.Value;
1113
}

.build/Solution.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
using System.Collections.Generic;
2-
using System.Linq;
31
using Nuke.Common.CI.GitHubActions;
42
using Nuke.Common.CI.GitHubActions.Configuration;
53
using Rocket.Surgery.Nuke.ContinuousIntegration;
64
using Rocket.Surgery.Nuke.DotNetCore;
75
using Rocket.Surgery.Nuke.GithubActions;
86

7+
namespace Build;
98

109
internal class LocalConstants
1110
{
12-
public static string[] PathsIgnore =
11+
public static string[] PathsIgnore => new[]
1312
{
1413
".codecov.yml",
1514
".editorconfig",
@@ -37,7 +36,7 @@ internal class LocalConstants
3736
GitHubActionsImage.WindowsLatest,
3837
GitHubActionsImage.UbuntuLatest,
3938
AutoGenerate = false,
40-
On = new[] { GitHubActionsTrigger.Push },
39+
On = new[] { RocketSurgeonGitHubActionsTrigger.Push },
4140
OnPushTags = new[] { "v*" },
4241
OnPushBranches = new[] { "master", "main", "next" },
4342
OnPullRequestBranches = new[] { "master", "main", "next" },
@@ -49,7 +48,7 @@ internal class LocalConstants
4948
GitHubActionsImage.WindowsLatest,
5049
GitHubActionsImage.UbuntuLatest,
5150
AutoGenerate = false,
52-
On = new[] { GitHubActionsTrigger.Push },
51+
On = new[] { RocketSurgeonGitHubActionsTrigger.Push },
5352
OnPushTags = new[] { "v*" },
5453
OnPushBranches = new[] { "master", "main", "next" },
5554
OnPullRequestBranches = new[] { "master", "main", "next" },

.nuke/build.schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"title": "Build Schema",
43
"$ref": "#/definitions/build",
4+
"title": "Build Schema",
55
"definitions": {
66
"build": {
77
"type": "object",
@@ -155,4 +155,4 @@
155155
}
156156
}
157157
}
158-
}
158+
}

0 commit comments

Comments
 (0)