Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Common.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ dotnet_diagnostic.SA1000.severity = none
dotnet_diagnostic.SA1001.severity = none

# Semicolons should not be preceded by a space
dotnet_diagnostic.SA1002.severity = suggestion
dotnet_diagnostic.SA1002.severity = warning

dotnet_diagnostic.SA1003.severity = none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ public static IEnumerable<object[]> InsertMetadataElemenetBeforeSiblingsTestData
[MemberData(nameof(InsertMetadataElemenetBeforeSiblingsTestData))]
public void InsertMetadataElementBeforeSiblings(AddMetadata addMetadata, int position, string expectedItem)
{
Action<ProjectItemElement, ProjectMetadataElement, ProjectMetadataElement> act = (i, c, r) => { i.InsertBeforeChild(c, r);};
Action<ProjectItemElement, ProjectMetadataElement, ProjectMetadataElement> act = (i, c, r) => { i.InsertBeforeChild(c, r); };

AssertMetadataConstruction(addMetadata, position, expectedItem, act);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,7 @@ public void ReloadFromFileWhenProjectIsInMemorySetsProjectFile()
AssertProjectFileAfterReload(
true,
false,
(initial, reload, actualFile) => { Assert.Equal(reload, actualFile);});
(initial, reload, actualFile) => { Assert.Equal(reload, actualFile); });
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ public void RenameItem_StillMatchesWildcard()
[MemberData(nameof(ItemElementsWithGlobsThatRequireSplitting))]
public void RenameThrowsWhenItemElementSplittingIsDisabled(string projectContents, int itemIndex, SetupProject setupProject)
{
AssertDisabledItemSplitting(projectContents, itemIndex, setupProject, (p, i) => {i.Rename("foo");});
AssertDisabledItemSplitting(projectContents, itemIndex, setupProject, (p, i) => {i.Rename("foo"); });
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Build.OM.UnitTests/Definition/Project_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4257,7 +4257,7 @@ private static void AssertGlobResult(GlobResultList expected, string project)

private static void AssertGlobResult(GlobResultList expected, string project, string itemType)
{
var globs = ObjectModelHelpers.CreateInMemoryProject(project).GetAllGlobs(itemType) ;
var globs = ObjectModelHelpers.CreateInMemoryProject(project).GetAllGlobs(itemType);
AssertGlobResultsEqual(expected, globs);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ private void CopyFromInternal(ProjectRootElement sourceProject)
Assert.NotSame(realExistingItemGroup, newDeepCopy.Real);
// TODO XmlLocation is (correctly) different for the items, need to find a way to bypass it.
var context = new ValidationContext();
context.ValidateLocation = delegate (ElementLocation a, ElementLocation e) { return;};
context.ValidateLocation = delegate (ElementLocation a, ElementLocation e) { return; };

ViewValidation.Verify(newDeepCopy.View, realExistingItemGroup, context);
newDeepCopy.View.Label = "DeepCopyFrom";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public MockProjectUsingTaskParameterElementLink(MockProjectUsingTaskParameterEle
object ILinkMock.Remoter => this.Proxy;
MockProjectElementLinkRemoter IProjectElementLinkHelper.ElementProxy => this.Proxy;

public override string Name { get => Proxy.Name ; set =>Proxy.Name = value; }
public override string Name { get => Proxy.Name; set =>Proxy.Name = value; }
#region ProjectElementLink redirectors
private IProjectElementLinkHelper EImpl => (IProjectElementLinkHelper)this;
public override ProjectElementContainer Parent => EImpl.GetParent();
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Construction/ProjectElementContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public ICollection<ProjectElement> ChildrenReversed
/// <summary>
/// Number of children of any kind
/// </summary>
public int Count { get => Link != null ? ContainerLink.Count : _count ; private set => _count = value; }
public int Count { get => Link != null ? ContainerLink.Count : _count; private set => _count = value; }

/// <summary>
/// First child, if any, otherwise null.
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Graph/ProjectGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public delegate ProjectInstance ProjectInstanceFactoryFunc(

internal GraphBuilder.GraphEdges TestOnly_Edges => Edges;

public GraphConstructionMetrics ConstructionMetrics { get; private set;}
public GraphConstructionMetrics ConstructionMetrics { get; private set; }

/// <summary>
/// Various metrics on graph construction.
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/Sdk/SdkResultItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Microsoft.Build.Framework
public class SdkResultItem
{
public string ItemSpec { get; set; }
public Dictionary<string, string>? Metadata { get;}
public Dictionary<string, string>? Metadata { get; }

public SdkResultItem()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Shared/FileUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ internal static String GetDirectoryNameOfFullPath(String fullPath)
if (fullPath != null)
{
int i = fullPath.Length;
while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar) ;
while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar);
return FixFilePath(fullPath.Substring(0, i));
}
return null;
Expand Down Expand Up @@ -449,7 +449,7 @@ From Path.cs in the CLR

internal static string FixFilePath(string path)
{
return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/');//.Replace("//", "/");
return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/'); //.Replace("//", "/");
}

#if !CLR2COMPATIBILITY
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks.UnitTests/ResolveSDKReference_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ public void VerifyUnResolvedSDKMessage()
reference4.DependsOnSDK = "NotThere, Version=1.0";
references.Add(reference4);

ResolveSDKReference.VerifySDKDependsOn(log, references);//, new Version(8, 1), "Windows", null);
ResolveSDKReference.VerifySDKDependsOn(log, references); //, new Version(8, 1), "Windows", null);
Assert.Equal(4, engine.Warnings);
Assert.Equal(0, engine.Errors);

Expand Down