File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414build_ * /
1515install /
1616install_ * /
17+
18+ # Mac OS specific files
19+ .DS_Store
Original file line number Diff line number Diff line change @@ -42,6 +42,11 @@ bool CsharpParser::parse()
4242 bool success = true ;
4343
4444 std::vector<std::string> paths = _ctx.options [" input" ].as <std::vector<std::string>>();
45+ if (paths.empty ())
46+ {
47+ LOG (error) << " No input path specified for C# parser!" ;
48+ return false ;
49+ }
4550 std::string buildPath = _ctx.options [" build-dir" ].as <std::string>();
4651
4752 if (acceptProjectBuildPath (buildPath))
@@ -86,14 +91,11 @@ bool CsharpParser::parseProjectBuildPath(
8691 command.append (" ' " );
8792 command.append (std::to_string (_ctx.options [" jobs" ].as <int >()));
8893
89- for (auto p : paths_)
94+ for (const auto & inputPath : paths_)
9095 {
91- if (fs::is_directory (p))
92- {
93- command.append (" '" );
94- command.append (p);
95- command.append (" ' " );
96- }
96+ command.append (" '" );
97+ command.append (inputPath);
98+ command.append (" '" );
9799 }
98100
99101 LOG (debug) << " CSharpParser command: " << command;
@@ -113,7 +115,7 @@ bool CsharpParser::parseProjectBuildPath(
113115
114116 while (std::getline (log_str, line, ' \n ' ))
115117 {
116- if (line[0 ] == ' +' || line[0 ] == ' -' )
118+ if (! line. empty () && (line [0 ] == ' +' || line[0 ] == ' -' ) )
117119 {
118120 addSource (line.substr (1 ), line[0 ] == ' -' );
119121 if (line[0 ] == ' +' )
@@ -125,6 +127,10 @@ bool CsharpParser::parseProjectBuildPath(
125127 countPart++;
126128 }
127129 }
130+ else if (!line.empty ())
131+ {
132+ LOG (debug) << " [CSharpParser] " << line;
133+ }
128134 }
129135
130136 ch::steady_clock::time_point after = ch::steady_clock::now ();
Original file line number Diff line number Diff line change 1515 <PackageReference Include =" Microsoft.CodeAnalysis" Version =" 4.14.0" />
1616 <PackageReference Include =" Microsoft.CodeAnalysis.Common" Version =" 4.14.0" />
1717 <PackageReference Include =" Microsoft.CodeAnalysis.CSharp" Version =" 4.14.0" />
18+ <PackageReference Include =" Microsoft.CodeAnalysis.Workspaces.MSBuild" Version =" 4.14.0" />
1819 <PackageReference Include =" Microsoft.EntityFrameworkCore" Version =" 8.0.20" />
1920 <PackageReference Include =" Microsoft.EntityFrameworkCore.Tools" Version =" 8.0.20" >
2021 <PrivateAssets >all</PrivateAssets >
You can’t perform that action at this time.
0 commit comments