Skip to content

Commit

Permalink
analyzer makes sure to only ever report one problem at a time?
Browse files Browse the repository at this point in the history
  • Loading branch information
vadosnaprimer committed Dec 9, 2024
1 parent e02d22a commit 656618f
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.Text;

using BizHawk.Common;
using BizHawk.Common;

Check failure on line 1 in src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.IDriveLight.cs

View workflow job for this annotation

GitHub Actions / Build solution with analyzers

Using directive is unnecessary. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005)
using BizHawk.Emulation.Common;

namespace BizHawk.Emulation.Cores.Computers.Amiga
Expand Down

6 comments on commit 656618f

@Morilli
Copy link
Collaborator

@Morilli Morilli commented on 656618f Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're using an IDE you should be able to see all the warnings displayed in it. You can also build with -p:RunAnalyzersDuringBuild=true from command line to see all warnings.

@vadosnaprimer
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it a CI job then?

@Morilli
Copy link
Collaborator

@Morilli Morilli commented on 656618f Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because clearly that doesn't prevent non-conforming code to be pushed.

@vadosnaprimer
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be configured to report everything at once?

@Morilli
Copy link
Collaborator

@Morilli Morilli commented on 656618f Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. We could potentially not use warnaserror and collect the existence of warning messages some other way (if that's even possible).

I think in general if you're trying to fix reported code style violations it's best to run the command locally to see if you caught everything.

@YoshiRulz
Copy link
Member

@YoshiRulz YoshiRulz commented on 656618f Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does report everything at once; the IDE0005 "unused import" directive in particular just happens to only be raised once per file for a contiguous block of import statements.

Please sign in to comment.