Skip to content

Commit

Permalink
SA1518 - The line endings at the end of a file do not match the setti… (
Browse files Browse the repository at this point in the history
#7571)

Relates to #7174
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1518.md

The two remaining warnings/suggestions are from RoslynImmutableInterlocked pulled in from Microsoft.CodeAnalysis.Collections in Microsoft.Build.Framework.

Solution for the warnings from the nuget package is outlined in dotnet/roslyn#55992
  • Loading branch information
elachlan authored Apr 29, 2022
1 parent 10dbde3 commit 7c4597e
Show file tree
Hide file tree
Showing 84 changed files with 44 additions and 139 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1038,4 +1038,4 @@ private static ProjectItemElement GetItemFromContent(string content)
return Helpers.GetFirst(project.Items);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -780,4 +780,3 @@ public void ProjectOnErrorElementModify()
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,3 @@ public MockProjectChooseElementLink(MockProjectChooseElementLinkRemoter proxy, I
#endregion
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,4 @@ public void ForwardEvent(BuildEventArgs buildEvent)
#endregion
}
}
}
}
2 changes: 1 addition & 1 deletion src/Build.UnitTests/BackEnd/EventRedirectorToSink_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ public void TestForwardingNullEvent()
);
}
}
}
}
1 change: 0 additions & 1 deletion src/Build.UnitTests/BackEnd/TargetUpToDateChecker_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1031,4 +1031,3 @@ private void SimpleSymlinkInputCheck(DateTime symlinkWriteTime, DateTime targetW
}
}
}

2 changes: 1 addition & 1 deletion src/Build.UnitTests/Collections/MultiDictionary_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,4 @@ public void Clear()
Assert.Equal(0, dictionary.ValueCount);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Build.UnitTests/Definition/ProjectItem_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ private static IList<ProjectItem> GetItems(string content)
return item;
}
}
}
}
1 change: 0 additions & 1 deletion src/Build.UnitTests/Definition/ToolsetReader_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2983,4 +2983,3 @@ public override RegistryKeyWrapper OpenSubKey(string name)
}
#endif
}

2 changes: 1 addition & 1 deletion src/Build.UnitTests/Globbing/CompositeGlob_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ public void CreateShouldReturnNewCompositeWhenMultipleProvided()
Assert.Equal(2, composite.Globs.Count());
}
}
}
}
2 changes: 1 addition & 1 deletion src/Build.UnitTests/Globbing/MSBuildGlobWithGaps_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ public void GlobWithGapsShouldNotMatchIfGapsMatch()
Assert.False(glob.IsMatch("ab"));
}
}
}
}
2 changes: 1 addition & 1 deletion src/Build.UnitTests/MockElementLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ internal static MockElementLocation Instance
get { return s_instance; }
}
}
}
}
2 changes: 1 addition & 1 deletion src/Build/Collections/ArrayDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,4 @@ public void Reset()
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/Build/Construction/ImplicitImportLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ public enum ImplicitImportLocation
/// </summary>
Bottom
}
}
}
2 changes: 1 addition & 1 deletion src/Build/Definition/NewProjectFileOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ public enum NewProjectFileOptions
/// </summary>
IncludeAllOptions = ~0
}
}
}
2 changes: 1 addition & 1 deletion src/Build/Definition/SubToolset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ internal static SubToolset FactoryForDeserialization(ITranslator translator)
return subToolset;
}
}
}
}
2 changes: 1 addition & 1 deletion src/Build/Evaluation/Conditionals/OperandExpressionNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ internal override bool DetectOr()
#endregion

}
}
}
2 changes: 1 addition & 1 deletion src/Build/Evaluation/ItemsAndMetadataPair.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ internal Dictionary<string, MetadataReference> Metadata
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/Build/Globbing/Extensions/MSBuildGlobExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ public static IEnumerable<MSBuildGlob> GetParsedGlobs(this IMSBuildGlob glob)
return parsedGlobVisitor.CollectedGlobs;
}
}
}
}
2 changes: 1 addition & 1 deletion src/Build/Globbing/IMSBuildGlob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ public interface IMSBuildGlob
/// <returns></returns>
bool IsMatch(string stringToMatch);
}
}
}
2 changes: 1 addition & 1 deletion src/Build/Globbing/MSBuildGlobWithGaps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ public bool IsMatch(string stringToMatch)
return MainGlob.IsMatch(stringToMatch) && !Gaps.IsMatch(stringToMatch);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Build/Globbing/Visitor/GlobVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ protected virtual void VisitMSBuildGlob(MSBuildGlob msbuildGlob)
{
}
}
}
}
2 changes: 1 addition & 1 deletion src/Build/Globbing/Visitor/ParsedGlobCollector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ protected override void VisitMSBuildGlob(MSBuildGlob msbuildGlob)
_collectedGlobs.Add(msbuildGlob);
}
}
}
}
6 changes: 0 additions & 6 deletions src/Framework.UnitTests/Attribute_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,3 @@ internal static bool TestValue2
}
}
}






2 changes: 1 addition & 1 deletion src/Framework.UnitTests/BuildStartedEventArgs_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ public BuildStartedEventArgs2()
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/Framework.UnitTests/ProjectStartedEventArgs_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ public ProjectStartedEventArgs2()
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/Framework.UnitTests/TaskCommandLineEventArgs_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ public TaskCommandLineEventArgs2() : base()
}
}
}
}
}
1 change: 0 additions & 1 deletion src/Framework/BuildStatusEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,3 @@ params object[] messageArgs
}
}
}

2 changes: 1 addition & 1 deletion src/Framework/IBuildEngine5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ public interface IBuildEngine5 : IBuildEngine4
/// <param name="properties">The event properties.</param>
void LogTelemetry(string eventName, IDictionary<string, string> properties);
}
}
}
2 changes: 1 addition & 1 deletion src/Framework/ITaskFactory2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ public interface ITaskFactory2 : ITaskFactory
/// </returns>
ITask CreateTask(IBuildEngine taskFactoryLoggingHost, IDictionary<string, string> taskIdentityParameters);
}
}
}
2 changes: 1 addition & 1 deletion src/Framework/ITaskItemExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ public static IEnumerable<KeyValuePair<string, string>> EnumerateMetadata(this I
return list;
}
}
}
}
1 change: 0 additions & 1 deletion src/Framework/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,3 @@

[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]

2 changes: 1 addition & 1 deletion src/Framework/RunInMTAAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ public RunInMTAAttribute()
// do nothing
}
}
}
}
2 changes: 1 addition & 1 deletion src/Framework/RunInSTAAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ public RunInSTAAttribute()
// do nothing
}
}
}
}
2 changes: 1 addition & 1 deletion src/MSBuild/LogMessagePacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ static internal INodePacket FactoryForDeserialization(ITranslator translator)
return new LogMessagePacket(translator);
}
}
}
}
2 changes: 1 addition & 1 deletion src/MSBuild/ProjectSchemaValidationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,4 @@ private void OnSchemaValidationError(object sender, ValidationEventArgs args)
#endregion // Event Handlers
}
}
#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ internal class AssemblyFolderItem
[DataMember(IsRequired = false, Order = 4)]
internal string Platform { get; set; }
}
}
}
2 changes: 1 addition & 1 deletion src/Shared/FileDelegates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ namespace Microsoft.Build.Shared
/// </summary>
/// <param name="path">The path to create.</param>
internal delegate FileStream FileCreate(string path);
}
}
2 changes: 1 addition & 1 deletion src/Shared/IKeyed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ string Key
get;
}
}
}
}
1 change: 0 additions & 1 deletion src/Shared/LanguageParser/CSharptokenCharReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,3 @@ internal bool SinkMultipleWhiteSpace()
}
}
}

1 change: 0 additions & 1 deletion src/Shared/LanguageParser/VisualBasictokenCharReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,3 @@ internal bool SinkTypeCharacter()
}
}
}

1 change: 0 additions & 1 deletion src/Shared/LanguageParser/tokenChar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,3 @@ static internal bool IsOctalDigit(char c)
}
}
}

1 change: 0 additions & 1 deletion src/Shared/LanguageParser/tokenCharReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,4 +353,3 @@ internal bool SinkMultipleDecimalDigits()
}
}
}

2 changes: 1 addition & 1 deletion src/Shared/NGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ public static implicit operator NGen<T>(T value)
return new NGen<T>(value);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Shared/NodeEngineShutdownReason.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ public enum NodeEngineShutdownReason
Error,
}
#endregion
}
}
2 changes: 1 addition & 1 deletion src/Shared/Pair.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ internal TValue Value
get { return _value; }
}
}
}
}
2 changes: 1 addition & 1 deletion src/Shared/UnitTests/PrintLineDebugger_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,4 @@ public void CannotUnsetWriterWhenNoWriterIsSet()
}
}
}
#endif
#endif
1 change: 0 additions & 1 deletion src/Shared/UnitTests/TypeLoader_Dependencies_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,3 @@ private void CheckIfCorrectAssemblyLoaded(string scriptOutput, string expectedAs
}
}
}

1 change: 0 additions & 1 deletion src/Shared/UnitTests/TypeLoader_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,3 @@ private static bool IsForwardingLoggerClass(Type type, object unused)
#endif
}
}

5 changes: 0 additions & 5 deletions src/Tasks.UnitTests/Al_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,3 @@ public void Win32Resource()
}
}
}





3 changes: 0 additions & 3 deletions src/Tasks.UnitTests/AssignCulture_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,3 @@ public void PseudoLocalization(string culture)
}
}
}



3 changes: 0 additions & 3 deletions src/Tasks.UnitTests/AssignLinkMetadata_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,3 @@ private ITaskItem GetParentedTaskItem(string itemSpec, string linkMetadata = nul
}
}
}



3 changes: 0 additions & 3 deletions src/Tasks.UnitTests/AssignTargetPath_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,3 @@ public void TargetPathAlreadySet(string targetPath)
}
}
}



3 changes: 0 additions & 3 deletions src/Tasks.UnitTests/CSharpParserUtilitites_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,3 @@ private static void AssertParse(string source, string expectedClassName)
}
}
}



3 changes: 0 additions & 3 deletions src/Tasks.UnitTests/CSharpTokenizer_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,3 @@ int expectedLastLineNumber
}
}
}



1 change: 0 additions & 1 deletion src/Tasks.UnitTests/CodeTaskFactoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1168,4 +1168,3 @@ public void CodeTaskFactoryNotSupported()
}
#endif
}

Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,3 @@ private void AssertSimpleCase(string code, string expected)
}
}
}



3 changes: 0 additions & 3 deletions src/Tasks.UnitTests/Culture_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,3 @@ public void BogusEmbeddedCulture()
}
}
}



3 changes: 0 additions & 3 deletions src/Tasks.UnitTests/Delete_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,3 @@ public void AttributeForwarding()
}
}
}



2 changes: 1 addition & 1 deletion src/Tasks.UnitTests/DirectoryBuildPropsImportTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ sealed public class DirectoryBuildPropsImportTests : DirectoryBuildProjectImport

protected override string ImportDirectoryBuildProjectPropertyName => "ImportDirectoryBuildProps";
}
}
}
Loading

0 comments on commit 7c4597e

Please sign in to comment.