Skip to content

Commit 7c5eb2b

Browse files
committed
Revert "Disable fomatting checks"
This reverts commit ccbfd86.
1 parent ccbfd86 commit 7c5eb2b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ csharp_style_prefer_parameter_null_checking = false # not default, disabled as n
329329
#### .NET Formatting Rules ####
330330

331331
# IDE0055: Fix formatting - Set the severity of all .NET and C# formatting rules (https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules)
332-
dotnet_diagnostic.IDE0055.severity = none # Nice formatting is great, but when copilot changes code we more than not end up with some extra whitespace.
332+
dotnet_diagnostic.IDE0055.severity = warning # ensure all formatting rules are enforced on build
333333

334334
# IDE0057: Use range operator
335335
dotnet_diagnostic.IDE0057.severity = none # Range operator is not supported in some TFMs.

test/vstest.console.UnitTests/Internal/FilePatternParserTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,16 @@ public void FilePatternParserShouldCorrectlySplitPatternAndDirectoryWithForwardS
119119
{
120120
var patternMatchingResult = new PatternMatchingResult(new List<FilePatternMatch>());
121121
_mockMatcherHelper.Setup(x => x.Execute(It.IsAny<DirectoryInfoWrapper>())).Returns(patternMatchingResult);
122-
122+
123123
// Test with forward slashes - this should work on all platforms
124124
// This specifically tests the fix for issue #14993
125125
_filePatternParser.GetMatchingFiles("C:/Users/someUser/Desktop/a/c/*bc.dll");
126126

127127
// Assert that the pattern is parsed correctly
128128
_mockMatcherHelper.Verify(x => x.AddInclude("*bc.dll"));
129129
// On Windows, the path may be normalized, so we verify the key components are present
130-
_mockMatcherHelper.Verify(x => x.Execute(It.Is<DirectoryInfoWrapper>(y =>
131-
y.FullName.Contains("someUser") && y.FullName.Contains("Desktop") &&
130+
_mockMatcherHelper.Verify(x => x.Execute(It.Is<DirectoryInfoWrapper>(y =>
131+
y.FullName.Contains("someUser") && y.FullName.Contains("Desktop") &&
132132
y.FullName.Contains("a") && y.FullName.EndsWith("c"))));
133133
}
134134

@@ -137,13 +137,13 @@ public void FilePatternParserShouldCorrectlySplitWithArbitraryDirectoryDepthWith
137137
{
138138
var patternMatchingResult = new PatternMatchingResult(new List<FilePatternMatch>());
139139
_mockMatcherHelper.Setup(x => x.Execute(It.IsAny<DirectoryInfoWrapper>())).Returns(patternMatchingResult);
140-
140+
141141
// Test with forward slashes and recursive patterns
142142
_filePatternParser.GetMatchingFiles("C:/Users/vanidhi/**/c/*bc.txt");
143143

144144
// Assert
145145
_mockMatcherHelper.Verify(x => x.AddInclude("**/c/*bc.txt"));
146-
_mockMatcherHelper.Verify(x => x.Execute(It.Is<DirectoryInfoWrapper>(y =>
146+
_mockMatcherHelper.Verify(x => x.Execute(It.Is<DirectoryInfoWrapper>(y =>
147147
y.FullName.Contains("vanidhi"))));
148148
}
149149

@@ -152,7 +152,7 @@ public void FilePatternParserShouldHandleForwardSlashesWithoutThrowingException(
152152
{
153153
var patternMatchingResult = new PatternMatchingResult(new List<FilePatternMatch>());
154154
_mockMatcherHelper.Setup(x => x.Execute(It.IsAny<DirectoryInfoWrapper>())).Returns(patternMatchingResult);
155-
155+
156156
// This is the specific case from the original bug report that was throwing ArgumentOutOfRangeException
157157
// Before the fix: System.ArgumentOutOfRangeException: length ('-1') must be a non-negative value
158158
_filePatternParser.GetMatchingFiles("C:/path/to/my/tests/*_Tests.dll");

0 commit comments

Comments
 (0)