@@ -39,15 +39,13 @@ public static async Task<int> Process(IHost host, List<FileInfo> projects, strin
3939 return 0 ;
4040 }
4141
42- private static FileInfo OutputFile ( FileInfo workingDirectory , string output )
43- {
44- return Path . IsPathRooted ( output ) ? new FileInfo ( output ) : new FileInfo ( Path . Join ( workingDirectory . FullName , output ) ) ;
45- }
42+ private static FileInfo OutputFile ( FileInfo workingDirectory , string output ) =>
43+ Path . IsPathRooted ( output ) ? new FileInfo ( output ) : new FileInfo ( Path . Join ( workingDirectory . FullName , output ) ) ;
4644
4745 private static async Task ScipIndex ( IHost host , IndexCommandOptions options )
4846 {
4947 var stopwatch = Stopwatch . StartNew ( ) ;
50- var indexer = host . Services . GetRequiredService < ScipIndexer > ( ) ;
48+ var indexer = host . Services . GetRequiredService < ScipProjectIndexer > ( ) ;
5149 var index = new Scip . Index
5250 {
5351 Metadata = new Metadata
@@ -71,18 +69,16 @@ private static async Task ScipIndex(IHost host, IndexCommandOptions options)
7169 stopwatch . Elapsed . ToFriendlyString ( ) ) ;
7270 }
7371
74- private static string FixThisProblem ( string examplePath )
75- {
76- return
77- "To fix this problem, pass the path of a solution (.sln) or project (.csproj) file to the `scip-dotnet index` command. " +
78- $ "For example, run: scip-dotnet index { examplePath } ";
79- }
72+ private static string FixThisProblem ( string examplePath ) =>
73+ "To fix this problem, pass the path of a solution (.sln) or project (.csproj/.vbrpoj) file to the `scip-dotnet index` command. " +
74+ $ "For example, run: scip-dotnet index { examplePath } ";
8075
8176 private static List < FileInfo > FindSolutionOrProjectFile ( FileInfo workingDirectory , ILogger logger )
8277 {
8378 var paths = Directory . GetFiles ( workingDirectory . FullName ) . Where ( file =>
8479 string . Equals ( Path . GetExtension ( file ) , ".sln" , StringComparison . OrdinalIgnoreCase ) ||
85- string . Equals ( Path . GetExtension ( file ) , ".csproj" , StringComparison . OrdinalIgnoreCase )
80+ string . Equals ( Path . GetExtension ( file ) , ".csproj" , StringComparison . OrdinalIgnoreCase ) ||
81+ string . Equals ( Path . GetExtension ( file ) , ".vbproj" , StringComparison . OrdinalIgnoreCase )
8682 ) . ToList ( ) ;
8783
8884 if ( paths . Count != 0 )
@@ -91,7 +87,7 @@ private static List<FileInfo> FindSolutionOrProjectFile(FileInfo workingDirector
9187 }
9288
9389 logger . LogError (
94- "No solution (.sln) or .csproj file detected in the working directory '{WorkingDirectory}'. {FixThis}" ,
90+ "No solution (.sln) or .csproj/.vbproj file detected in the working directory '{WorkingDirectory}'. {FixThis}" ,
9591 workingDirectory . FullName , FixThisProblem ( "SOLUTION_FILE" ) ) ;
9692 return new List < FileInfo > ( ) ;
9793 }
0 commit comments