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 @@ -755,7 +755,7 @@ dotnet_diagnostic.SA1021.severity = suggestion
dotnet_diagnostic.SA1023.severity = warning

# Colon should be followed by a space
dotnet_diagnostic.SA1024.severity = suggestion
dotnet_diagnostic.SA1024.severity = warning

# Code should not contain multiple whitespace characters in a row
dotnet_diagnostic.SA1025.severity = suggestion
Expand Down
2 changes: 1 addition & 1 deletion src/Build.OM.UnitTests/Definition/ProjectItem_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ private static void TestIncludeExcludeWithDifferentSlashes(string projectContent
{
Action<string, string> runTest = (include, exclude) =>
{
TestIncludeExclude(projectContents, inputFiles, expectedInclude, include, exclude, normalizeSlashes: true, makeExpectedIncludeAbsolute:makeExpectedIncludeAbsolute);
TestIncludeExclude(projectContents, inputFiles, expectedInclude, include, exclude, normalizeSlashes: true, makeExpectedIncludeAbsolute: makeExpectedIncludeAbsolute);
};

var includeWithForwardSlash = Helpers.ToForwardSlash(includeString);
Expand Down
2 changes: 1 addition & 1 deletion src/Build.UnitTests/BuildEnvironmentHelper_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ public void BuildEnvironmentFindsAmd64()
[PlatformSpecific(TestPlatforms.Windows)]
public void BuildEnvironmentFindsAmd64RunningInAmd64NoVS()
{
using (var env = new EmptyStandaloneEnviroment(MSBuildExeName, writeFakeFiles:true, includeAmd64Folder:true))
using (var env = new EmptyStandaloneEnviroment(MSBuildExeName, writeFakeFiles: true, includeAmd64Folder: true))
{
var msBuild64Exe = Path.Combine(env.BuildDirectory, "amd64", MSBuildExeName);
BuildEnvironmentHelper.ResetInstance_ForUnitTestsOnly(() => msBuild64Exe, ReturnNull, ReturnNull,
Expand Down
2 changes: 1 addition & 1 deletion src/Build.UnitTests/ConsoleOutputAlignerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void IndentBiggerThanBuffer_IndentedAndNotAligned(string input, bool alig
string indent = " ";
var aligner = new ConsoleOutputAligner(bufferWidth: 4, alignMessages: aligned);

string output = aligner.AlignConsoleOutput(message:input, prefixAlreadyWritten: false, prefixWidth: indent.Length);
string output = aligner.AlignConsoleOutput(message: input, prefixAlreadyWritten: false, prefixWidth: indent.Length);

output.ShouldBe(indent + input + Environment.NewLine);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Build.UnitTests/Graph/IsolateProjects_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public IsolateProjectsTests(ITestOutputHelper testOutput)
{
// OSX links /var into /private, which makes Path.GetTempPath() to return "/var..." but Directory.GetCurrentDirectory to return "/private/var..."
// this discrepancy fails the msbuild undeclared reference enforcements due to failed path equality checks
_env.SetTempPath(Path.Combine(Directory.GetCurrentDirectory(), Guid.NewGuid().ToString("N")), deleteTempDirectory:true);
_env.SetTempPath(Path.Combine(Directory.GetCurrentDirectory(), Guid.NewGuid().ToString("N")), deleteTempDirectory: true);
}

// todo investigate why out of proc builds fail on macos https://github.com/dotnet/msbuild/issues/3915
Expand Down
4 changes: 2 additions & 2 deletions src/Build.UnitTests/ProjectCache/ProjectCacheTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1295,8 +1295,8 @@ public void EngineShouldHandleExceptionsFromCachePluginViaGraphBuild(ErrorLocati
{
{1, new []{2}}
},
extraContentPerProjectNumber:null,
extraContentForAllNodes:@$"
extraContentPerProjectNumber: null,
extraContentForAllNodes: @$"
<ItemGroup>
<{ItemTypeNames.ProjectCachePlugin} Include=`{SamplePluginAssemblyPath.Value}` />
<{ItemTypeNames.ProjectReferenceTargets} Include=`Build` Targets=`Build` />
Expand Down
2 changes: 1 addition & 1 deletion src/Build/BackEnd/Components/ProjectCache/ProxyTargets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Microsoft.Build.Experimental.ProjectCache
/// The proxy targets are left in the build result (i.e., both GetTargetPath and Build will appear in the build result).
/// Real targets can be committed in which case msbuild only keeps the proxy target in the build result.
/// </summary>
public class ProxyTargets: ITranslatable
public class ProxyTargets : ITranslatable
{
private Dictionary<string, string> _proxyTargetToRealTargetMap = null!;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace Microsoft.Build.BackEnd.SdkResolution
{
internal sealed class CachingSdkResolverService: SdkResolverService
internal sealed class CachingSdkResolverService : SdkResolverService
{
/// <summary>
/// Stores the cache in a set of concurrent dictionaries. The main dictionary is by build submission ID and the inner dictionary contains a case-insensitive SDK name and the cached <see cref="SdkResult"/>.
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 @@ -31,7 +31,7 @@ public abstract class ProjectElementContainer : ProjectElement
/// External projects support
/// </summary>
internal ProjectElementContainer(ProjectElementContainerLink link)
:base(link)
: base(link)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Build/Definition/ProjectCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,7 @@ private void CreateLoggingService(int maxCPUCount, bool onlyLogCriticalEvents)
/// </summary>
internal void ResetToolsetsForTests(ToolsetConfigurationReader configurationReaderForTestsOnly)
{
InitializeToolsetCollection(configReader:configurationReaderForTestsOnly);
InitializeToolsetCollection(configReader: configurationReaderForTestsOnly);
}

#if FEATURE_WIN32_REGISTRY
Expand All @@ -1744,7 +1744,7 @@ internal void ResetToolsetsForTests(ToolsetConfigurationReader configurationRead
/// </summary>
internal void ResetToolsetsForTests(ToolsetRegistryReader registryReaderForTestsOnly)
{
InitializeToolsetCollection(registryReader:registryReaderForTestsOnly);
InitializeToolsetCollection(registryReader: registryReaderForTestsOnly);
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/Build/Instance/ProjectItemGroupTaskItemInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Microsoft.Build.Execution
/// Immutable.
/// </summary>
[DebuggerDisplay("{_itemType} Include={_include} Exclude={_exclude} Remove={_remove} Condition={_condition}")]
public class ProjectItemGroupTaskItemInstance: ITranslatable
public class ProjectItemGroupTaskItemInstance : ITranslatable
{
/// <summary>
/// Item type, for example "Compile"
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Utilities/NuGetFrameworkWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public bool IsCompatible(string target, string candidate)

private string GetNonZeroVersionParts(Version version, int minVersionPartCount)
{
var nonZeroVersionParts = version.Revision == 0 ? version.Build == 0 ? version.Minor == 0 ? 1 : 2 : 3: 4;
var nonZeroVersionParts = version.Revision == 0 ? version.Build == 0 ? version.Minor == 0 ? 1 : 2 : 3 : 4;
return version.ToString(Math.Max(nonZeroVersionParts, minVersionPartCount));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/BuildEventContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public BuildEventContext
int targetId,
int taskId
)
:this(submissionId, nodeId, InvalidEvaluationId, projectInstanceId, projectContextId, targetId, taskId)
: this(submissionId, nodeId, InvalidEvaluationId, projectInstanceId, projectContextId, targetId, taskId)
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/Framework/ReuseableStringBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ internal static StringBuilder Get(int capacity)
// If user wants bigger capacity than maximum capacity, respect it.
returned = new StringBuilder(SelectBracketedCapacity(capacity));
#if DEBUG
MSBuildEventSource.Log.ReusableStringBuilderFactoryStart(hash: returned.GetHashCode(), newCapacity:capacity, oldCapacity:0, type:"miss");
MSBuildEventSource.Log.ReusableStringBuilderFactoryStart(hash: returned.GetHashCode(), newCapacity: capacity, oldCapacity: 0, type: "miss");
#endif
}
else if (returned.Capacity < capacity)
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/UnitTests/TestEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public TransientTempPath SetTempPath(string tempPath, bool deleteTempDirectory =
/// <param name="extension">Extensions of the file (defaults to '.tmp')</param>
public TransientTestFile CreateFile(string extension = ".tmp")
{
return WithTransientTestState(new TransientTestFile(extension, createFile:true, expectedAsOutput:false));
return WithTransientTestState(new TransientTestFile(extension, createFile: true, expectedAsOutput: false));
}

public TransientTestFile CreateFile(string fileName, string contents = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3738,7 +3738,7 @@ public static string GetTestResXContent(bool useType, string linkedBitmap, strin
/// <returns>The name of the resx file</returns>
public static string WriteTestResX(bool useType, string linkedBitmap, string extraToken, string resxFileToWrite = null, TestEnvironment env = null)
{
return WriteTestResX(useType, linkedBitmap, extraToken, useInvalidType: false, resxFileToWrite:resxFileToWrite);
return WriteTestResX(useType, linkedBitmap, extraToken, useInvalidType: false, resxFileToWrite: resxFileToWrite);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/Exec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public ITaskItem[] Outputs
/// if they aren't used. ConsoleOutput is a combination of stdout and stderr.
/// </summary>
[Output]
public ITaskItem[] ConsoleOutput => !ConsoleToMSBuild ? Array.Empty<ITaskItem>(): _nonEmptyOutput.ToArray();
public ITaskItem[] ConsoleOutput => !ConsoleToMSBuild ? Array.Empty<ITaskItem>() : _nonEmptyOutput.ToArray();

#endregion

Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/RedistList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public static RedistList GetFrameworkList35()
/// </summary>
public static RedistList GetRedistListFromPath(string path)
{
string[] redistListPaths = (path == null) ? Array.Empty<string>(): GetRedistListPathsFromDisk(path);
string[] redistListPaths = (path == null) ? Array.Empty<string>() : GetRedistListPathsFromDisk(path);

var assemblyTableInfos = new AssemblyTableInfo[redistListPaths.Length];
for (int i = 0; i < redistListPaths.Length; ++i)
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/ResolveComReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,7 @@ internal bool ResolveComReferencePia(ComReferenceInfo referenceInfo, string refN
/// <returns></returns>
internal IEnumerable<string> GetResolvedAssemblyReferenceItemSpecs()
{
return (ResolvedAssemblyReferences == null) ? Array.Empty<string>(): ResolvedAssemblyReferences.Select(rar => rar.ItemSpec);
return (ResolvedAssemblyReferences == null) ? Array.Empty<string>() : ResolvedAssemblyReferences.Select(rar => rar.ItemSpec);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities.UnitTests/ToolLocationHelper_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2679,7 +2679,7 @@ public void GetPathToReferenceAssembliesWithCustomTargetFrameworkInFallbackPathA
(string frameworkName, string frameworkVersion, string frameworkProfile, string customFrameworkDir, string fallbackSearchPaths)
=> ToolLocationHelper.GetPathToReferenceAssemblies(
frameworkName, "v" + frameworkVersion, frameworkProfile,
targetFrameworkRootPath:null, targetFrameworkFallbackSearchPaths:fallbackSearchPaths));
targetFrameworkRootPath: null, targetFrameworkFallbackSearchPaths: fallbackSearchPaths));
}
}

Expand Down