Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLI] Analyze command does not create the XML output file and returns incorrect exit code when only compiler diagnostics are reported #1055

Closed
PeterKaszab opened this issue Mar 20, 2023 · 1 comment · Fixed by #1056

Comments

@PeterKaszab
Copy link
Contributor

PeterKaszab commented Mar 20, 2023

Product and Version Used:
Roslynator.DotNet.Cli 0.5.0

Steps to Reproduce:
Create a new console project, and place the following code to Program.cs

int a, b = 1, 0;
Console.WriteLine(a);

Then, run roslynator analyze -o out.xml on the previously created project.

Actual Behavior:

  • CS0219 is reported, but out.xml is not created.
  • If the output also contains analyzer diagnostics, then out.xml created and contains both analyzer and compiler diagnostics.
  • Exit code is 0

Expected Behavior:
out.xml should be created even if it only contains compiler diagnostics.

  • Exit code should be 1
@PeterKaszab
Copy link
Contributor Author

Note: this is really similar to #963, which is already fixed by #964.

@PeterKaszab PeterKaszab changed the title [CLI] Analyze command does not create the XML output file if only compiler diagnostics are reported [CLI] Analyze command does not create the XML output file when only compiler diagnostics are reported Mar 20, 2023
@PeterKaszab PeterKaszab changed the title [CLI] Analyze command does not create the XML output file when only compiler diagnostics are reported [CLI] Analyze command does not create the XML output file and returns incorrect exit code when only compiler diagnostics are reported Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant