Skip to content

Commit 7a24f93

Browse files
committed
Configure Verify snapshot files and add VerifyChecksTests
Added .editorconfig and .gitattributes rules for Verify snapshot files to enforce UTF-8 BOM encoding and LF line endings. Updated .gitignore to exclude *.received.* files and folders. Introduced VerifyChecksTests to run snapshot verification in tests.
1 parent 394c5ee commit 7a24f93

4 files changed

Lines changed: 25 additions & 1 deletion

File tree

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,3 +306,13 @@ dotnet_diagnostic.S1643.severity = silent # Strings should not be concatena
306306
dotnet_diagnostic.S2344.severity = none # Enumeration type names should not have "Flags" or "Enum" suffixes
307307
dotnet_diagnostic.S3358.severity = silent # Ternary operators should not be nested
308308
dotnet_diagnostic.S1121.severity = none # Assignments should not be made from within sub-expressions
309+
310+
# Verify
311+
[*.{received,verified}.{cs,txt}]
312+
charset = utf-8-bom
313+
end_of_line = lf
314+
indent_size = unset
315+
indent_style = unset
316+
insert_final_newline = false
317+
tab_width = unset
318+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@
6161
#*.PDF diff=astextplain
6262
#*.rtf diff=astextplain
6363
#*.RTF diff=astextplain
64+
65+
# Verify
66+
*.verified.cs text eol=lf working-tree-encoding=UTF-8
67+
*.verified.txt text eol=lf working-tree-encoding=UTF-8

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,4 +360,8 @@ MigrationBackup/
360360
.ionide/
361361

362362
# Fody - auto-generated XML schema
363-
FodyWeavers.xsd
363+
FodyWeavers.xsd
364+
365+
# Verify
366+
*.received.*
367+
*.received/

tests/IeuanWalker.MinimalApi.Endpoints.Generator.Tests/ModuleInitializer.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@ public static void Init()
1111
VerifySourceGenerators.Initialize();
1212
}
1313
}
14+
15+
public sealed class VerifyChecksTests
16+
{
17+
[Fact]
18+
public Task Run() => VerifyChecks.Run();
19+
}

0 commit comments

Comments
 (0)