rules_dotnet
rules_dotnet copied to clipboard
Build fails with `treat_warnings_as_errors=True` and `warnings_not_as_errors` set
Using the following options in csharp_nunit_test
, the build can still fail with CS1591 errors. I imagine this is true of other rules as well.
csharp_nunit_test(
...
treat_warnings_as_errors = True,
warning_level = 4,
warnings_not_as_errors = ["CS1591"],
)
This rule generates the following .params file passed to the C# compiler:
/unsafe-
/checked-
/nostdlib+
/utf8output
/deterministic+
/filealign:512
/nologo
/highentropyva+
/warnaserror-:CS1591
/warnaserror+
/warn:4
/target:exe
/langversion:10.0
/debug-
/optimize+
/define:TRACE;RELEASE
/debug:portable
...
I believe the ordering of the /warnaserror
flags in the above is incorrect. It should be:
/warnaserror+
/warnaserror-:CS1591