Skip to content

Commit

Permalink
Workaround for MainFileIsHeader flag
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-jabbour-sonarsource committed Nov 28, 2024
1 parent 715e7da commit 12f692f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ internal sealed class VcxCompilationDatabaseStorage(IFileSystemService fileSyste
public string CreateDatabase(IFileConfig fileConfig)
{
threadHandling.ThrowIfOnUIThread();

var isHeaderFile = !string.IsNullOrEmpty(fileConfig.HeaderFileLanguage);
var compilationDatabaseEntry = new CompilationDatabaseEntry
{
Directory = fileConfig.CDDirectory,
Command = fileConfig.CDCommand,
File = fileConfig.CDFile
File = isHeaderFile ? "non_existent_file_to_trigger_header_path" : fileConfig.CDFile,
};
var compilationDatabase = new[] { compilationDatabaseEntry };

Expand Down

0 comments on commit 12f692f

Please sign in to comment.