@@ -27,9 +27,8 @@ public async Task<VerifyResult> VerifyDirectory(
2727 path ,
2828 pattern ,
2929 option ) ,
30- info ,
3130 fileScrubber ) ;
32- return await VerifyInner ( targets ) ;
31+ return await VerifyInner ( info , null , targets , true , true ) ;
3332 }
3433
3534#else
@@ -51,9 +50,8 @@ public async Task<VerifyResult> VerifyDirectory(
5150 path ,
5251 pattern ,
5352 option ) ,
54- info ,
5553 fileScrubber ) ;
56- return await VerifyInner ( targets ) ;
54+ return await VerifyInner ( info , null , targets , true , true ) ;
5755 }
5856
5957#endif
@@ -62,11 +60,9 @@ async Task<List<Target>> ToTargetsForDirectory(
6260 string directoryPath ,
6361 Func < string , bool > ? include ,
6462 IEnumerable < string > enumerateFiles ,
65- object ? info ,
6663 FileScrubber ? fileScrubber )
6764 {
68- var targets = new List < Target > ( 1 ) ;
69- AddInfoIfNotNull ( info , targets ) ;
65+ var targets = new List < Target > ( ) ;
7066
7167 include ??= _ => true ;
7268
@@ -104,22 +100,6 @@ static string NameForRelativePath(string directoryPath, string path)
104100 return relativePath ;
105101 }
106102
107- void AddInfoIfNotNull ( object ? info , List < Target > targets )
108- {
109- if ( info is null )
110- {
111- return ;
112- }
113-
114- targets . Add (
115- new (
116- settings . TxtOrJson ,
117- JsonFormatter . AsJson (
118- settings ,
119- counter ,
120- info ) ) ) ;
121- }
122-
123103 static async Task < Target > TargetFromFile ( string path , string name , FileScrubber ? fileScrubber , Func < Stream > openStream )
124104 {
125105 var extension = Path
0 commit comments