Skip to content

Commit 6365a2f

Browse files
committed
Remove spaces after "new" keyword (SA1000)
1 parent 26eb2ef commit 6365a2f

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

src/Cake.AzureDevOps.Tests/Fakes/FakeAllSetBuildClientFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public override BuildHttpClient CreateBuildClient(Uri collectionUrl, IAzureDevOp
3434
mock.Setup(arg => arg.GetBuildWorkItemsRefsAsync(It.IsAny<string>(), It.IsAny<int>(), It.IsAny<int?>(), null, default))
3535
.ReturnsAsync((string _, int _, int? _, object _, CancellationToken _) => new List<ResourceRef>
3636
{
37-
new () { Id = "42" },
37+
new() { Id = "42" },
3838
});
3939

4040
mock = this.Setup(mock);

src/Cake.AzureDevOps.Tests/Fakes/FakeAllSetGitClientFactory.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ protected override Mock<GitHttpClient> Setup(Mock<GitHttpClient> m)
105105
// Setup CommitDiffs object
106106
var gitChanges = new List<GitChange>
107107
{
108-
new ()
108+
new()
109109
{
110110
ChangeId = 1,
111111
ChangeType = VersionControlChangeType.Edit,
112112
Item = new GitItem("/src/project/myclass.cs", "ID1", GitObjectType.Commit, "6b13ff8", 0),
113113
},
114114
null,
115-
new ()
115+
new()
116116
{
117117
ChangeId = 2,
118118
ChangeType = VersionControlChangeType.Edit,
@@ -152,7 +152,7 @@ protected override Mock<GitHttpClient> Setup(Mock<GitHttpClient> m)
152152
// Setup GitPullRequestCommentThread collection
153153
var commentThreads = new List<GitPullRequestCommentThread>
154154
{
155-
new ()
155+
new()
156156
{
157157
Id = 11,
158158
ThreadContext = new CommentThreadContext()
@@ -161,12 +161,12 @@ protected override Mock<GitHttpClient> Setup(Mock<GitHttpClient> m)
161161
},
162162
Comments =
163163
[
164-
new () { Content = "Hello", IsDeleted = false, CommentType = CommentType.CodeChange, Id = 1 },
165-
new () { Content = "Goodbye", IsDeleted = true, CommentType = CommentType.Text, Id = 2 },
164+
new() { Content = "Hello", IsDeleted = false, CommentType = CommentType.CodeChange, Id = 1 },
165+
new() { Content = "Goodbye", IsDeleted = true, CommentType = CommentType.Text, Id = 2 },
166166
],
167167
Status = CommentThreadStatus.Active,
168168
},
169-
new ()
169+
new()
170170
{
171171
Id = 22,
172172
ThreadContext = null,
@@ -203,8 +203,8 @@ protected override Mock<GitHttpClient> Setup(Mock<GitHttpClient> m)
203203
.ReturnsAsync((Guid _, int _, bool? _, object _, CancellationToken _)
204204
=>
205205
[
206-
new () { Id = 42, CreatedDate = DateTime.Today.AddDays(-3) },
207-
new () { Id = 16, CreatedDate = DateTime.Today.AddDays(-1) },
206+
new() { Id = 42, CreatedDate = DateTime.Today.AddDays(-3) },
207+
new() { Id = 16, CreatedDate = DateTime.Today.AddDays(-1) },
208208
]);
209209

210210
m.Setup(arg => arg.GetPullRequestIterationsAsync(
@@ -216,16 +216,16 @@ protected override Mock<GitHttpClient> Setup(Mock<GitHttpClient> m)
216216
.ReturnsAsync((Guid _, int _, bool? _, object _, CancellationToken _)
217217
=>
218218
[
219-
new () { Id = null },
219+
new() { Id = null },
220220
]);
221221

222222
// Setup GitPullRequestIterationChanges collection
223223
var changes = new GitPullRequestIterationChanges
224224
{
225225
ChangeEntries =
226226
[
227-
new () { ChangeId = 100, ChangeTrackingId = 1, Item = new GitItem { Path = "/src/my/class1.cs" } },
228-
new () { ChangeId = 200, ChangeTrackingId = 2, Item = new GitItem { Path = string.Empty } },
227+
new() { ChangeId = 100, ChangeTrackingId = 1, Item = new GitItem { Path = "/src/my/class1.cs" } },
228+
new() { ChangeId = 200, ChangeTrackingId = 2, Item = new GitItem { Path = string.Empty } },
229229

230230
],
231231
};
@@ -274,7 +274,7 @@ protected override Mock<GitHttpClient> Setup(Mock<GitHttpClient> m)
274274
CancellationToken.None))
275275
.ReturnsAsync(() =>
276276
[
277-
new ("master"),
277+
new("master"),
278278
]);
279279

280280
m.Setup(

src/Cake.AzureDevOps.Tests/Fakes/FakeAllSetTestManagementClientFactory.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ public override TestManagementHttpClient CreateTestManagementClient(Uri collecti
2222
{
2323
ResultsForGroup =
2424
[
25-
new ()
25+
new()
2626
{
2727
Results =
2828
[
29-
new () { Id = 11, TestRun = new ShallowReference { Id = "1" } },
30-
new () { Id = 12, TestRun = new ShallowReference { Id = "1" } },
31-
new () { Id = 13, TestRun = new ShallowReference { Id = "1" } },
29+
new() { Id = 11, TestRun = new ShallowReference { Id = "1" } },
30+
new() { Id = 12, TestRun = new ShallowReference { Id = "1" } },
31+
new() { Id = 13, TestRun = new ShallowReference { Id = "1" } },
3232
],
3333
},
3434
],
@@ -40,9 +40,9 @@ public override TestManagementHttpClient CreateTestManagementClient(Uri collecti
4040
var result =
4141
new List<TestCaseResult>
4242
{
43-
new () { AutomatedTestName = "t1", Outcome = "Passed", ErrorMessage = string.Empty },
44-
new () { AutomatedTestName = "t2", Outcome = "Failed", ErrorMessage = "Error" },
45-
new () { AutomatedTestName = "t3", Outcome = "Passed", ErrorMessage = string.Empty },
43+
new() { AutomatedTestName = "t1", Outcome = "Passed", ErrorMessage = string.Empty },
44+
new() { AutomatedTestName = "t2", Outcome = "Failed", ErrorMessage = "Error" },
45+
new() { AutomatedTestName = "t3", Outcome = "Passed", ErrorMessage = string.Empty },
4646
};
4747

4848
if (top.HasValue)

src/Cake.AzureDevOps.Tests/Repos/PullRequest/CommentThread/AzureDevOpsPullRequestCommentThreadTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void Should_Return_Valid_Comment_Thread()
5252
ThreadContext = new CommentThreadContext { FilePath = "/src/myclass.cs" },
5353
Comments =
5454
[
55-
new () { Content = "Hello", CommentType = CommentType.Text, IsDeleted = false }
55+
new() { Content = "Hello", CommentType = CommentType.Text, IsDeleted = false }
5656
],
5757
Properties = [],
5858
};
@@ -157,7 +157,7 @@ public void Should_Set_Properly()
157157
{
158158
Comments =
159159
[
160-
new ("hi", false)
160+
new("hi", false)
161161
],
162162
};
163163

src/Cake.AzureDevOps/Repos/PullRequest/AzureDevOpsPullRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ public AzureDevOpsPullRequestCommentThread CreateComment(string comment)
512512
Status = AzureDevOpsCommentThreadStatus.Active,
513513
Comments =
514514
[
515-
new ()
515+
new()
516516
{
517517
CommentType = AzureDevOpsCommentType.System,
518518
IsDeleted = false,
@@ -547,7 +547,7 @@ public AzureDevOpsPullRequestCommentThread CreateComment(string comment, FilePat
547547
Status = AzureDevOpsCommentThreadStatus.Active,
548548
Comments =
549549
[
550-
new ()
550+
new()
551551
{
552552
CommentType = AzureDevOpsCommentType.System,
553553
IsDeleted = false,

0 commit comments

Comments
 (0)