-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #333 from rasmus/nullable
Implement nullable
- Loading branch information
Showing
317 changed files
with
731 additions
and
1,002 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// MIT License | ||
// | ||
// Copyright (c) 2021-2023 Rasmus Mikkelsen | ||
// Copyright (c) 2021-2024 Rasmus Mikkelsen | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
|
@@ -20,11 +20,6 @@ | |
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Bake.Core; | ||
using Bake.Extensions; | ||
using Bake.Services; | ||
|
@@ -38,9 +33,9 @@ namespace Bake.Tests.Helpers | |
{ | ||
public abstract class BakeTest : TestProject | ||
{ | ||
private CancellationTokenSource _timeout; | ||
private CancellationTokenSource? _timeout; | ||
|
||
private List<Release> _releases; | ||
private List<Release> _releases = null!; | ||
protected IReadOnlyCollection<Release> Releases => _releases; | ||
|
||
protected BakeTest(string projectName) : base(projectName) | ||
|
@@ -57,7 +52,7 @@ public void SetUpBakeTest() | |
[TearDown] | ||
public void TearDownBakeTest() | ||
{ | ||
_timeout.Dispose(); | ||
_timeout?.Dispose(); | ||
_timeout = null; | ||
} | ||
|
||
|
@@ -132,20 +127,7 @@ public Task CreateReleaseAsync( | |
GitHubInformation gitHubInformation, | ||
CancellationToken cancellationToken) | ||
{ | ||
return Task.FromResult<PullRequestInformation>(null); | ||
} | ||
|
||
public Task<IReadOnlyCollection<Commit>> GetCommitsAsync(string baseSha, string headSha, | ||
GitHubInformation gitHubInformation, | ||
CancellationToken cancellationToken) | ||
{ | ||
var commits = new List<Commit> | ||
{ | ||
new("Wrote some awesome tests", "c2dbe6e", DateTimeOffset.Now, new Author("Rasmus Mikkelsen", "[email protected]")), | ||
new("Got it working", "4d79e4e", DateTimeOffset.Now, new Author("Rasmus Mikkelsen", "[email protected]")) | ||
}; | ||
|
||
return Task.FromResult<IReadOnlyCollection<Commit>>(commits); | ||
return Task.FromResult<PullRequestInformation?>(null); | ||
} | ||
|
||
public Task<IReadOnlyCollection<PullRequest>> GetPullRequestsAsync(string baseSha, | ||
|
@@ -156,7 +138,7 @@ public Task<IReadOnlyCollection<PullRequest>> GetPullRequestsAsync(string baseSh | |
throw new NotImplementedException(); | ||
} | ||
|
||
public Task<PullRequest> GetPullRequestAsync( | ||
public Task<PullRequest?> GetPullRequestAsync( | ||
GitHubInformation gitHubInformation, | ||
int number, | ||
CancellationToken cancellationToken) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.