Skip to content

Commit cb3e9ed

Browse files
committed
Remove IgnoreParseWarnings option and replace functionality with Verbose option.
1 parent fbf4306 commit cb3e9ed

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/Generator.Tests/GeneratorTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public virtual void Setup(Driver driver)
3030
options.OutputDir = Path.Combine(GetOutputDirectory(), "gen", name);
3131
options.SharedLibraryName = name + ".Native";
3232
options.Quiet = true;
33-
options.IgnoreParseWarnings = true;
3433

3534
Diagnostics.Message("");
3635
Diagnostics.Message("Generating bindings for {0} ({1})",

src/Generator/Driver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ void OnFileParsed(IEnumerable<string> files, ParserResult result)
102102
{
103103
var diag = result.GetDiagnostics(i);
104104

105-
if (Options.IgnoreParseWarnings
106-
&& diag.Level == ParserDiagnosticLevel.Warning)
105+
if (diag.Level == ParserDiagnosticLevel.Warning &&
106+
!Options.Verbose)
107107
continue;
108108

109109
if (diag.Level == ParserDiagnosticLevel.Note)

src/Generator/Options.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,18 @@ public DriverOptions()
2929
}
3030

3131
// General options
32+
33+
/// <summary>
34+
/// Set to true to enable quiet output mode.
35+
/// </summary>
3236
public bool Quiet;
3337
public bool OutputDebug;
3438

39+
/// <summary>
40+
/// Set to true to enable verbose output mode.
41+
/// </summary>
42+
public bool Verbose;
43+
3544
/// <summary>
3645
/// Set to true to simulate generating without actually writing
3746
/// any output to disk. This can be useful to activate while
@@ -55,7 +64,6 @@ public Module MainModule
5564

5665
// Parser options
5766
public List<string> Headers => MainModule.Headers;
58-
public bool IgnoreParseWarnings;
5967

6068
// Library options
6169
public List<string> Libraries => MainModule.Libraries;

0 commit comments

Comments
 (0)