Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ indent_style = space
max_line_length = 200
brace_style = end_of_line
trim_trailing_whitespace = true
dotnet_diagnostic.IDE0005.severity = error

Choose a reason for hiding this comment

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

Action required

1. Ide0005 breaks generated usings 🐞 Bug ⛯ Reliability

Setting IDE0005 to error will flag unused MSBuild-generated global usings (e.g.,
Microsoft.Extensions.Logging) as errors in test projects like Eventuous.Tests that don’t
reference any logging types. This produces persistent analyzer errors in generated
GlobalUsings.g.cs that aren’t fixable by editing source files’ using directives.
Agent Prompt
### Issue description
`dotnet_diagnostic.IDE0005.severity = error` will surface errors originating from *generated* global usings (from MSBuild `<Using Include=.../>`) that are unused in some projects, e.g. `Eventuous.Tests`.

### Issue Context
- Test projects receive a global using for `Microsoft.Extensions.Logging` via `src/Directory.Build.props`.
- At least `src/Core/test/Eventuous.Tests` appears not to use logging types, so that global using becomes unused.

### Fix Focus Areas
Choose one (or combine):
- Suppress IDE0005 for generated global usings files (recommended):
  - `.editorconfig[1-15]` add a section like `[**/GlobalUsings.g.cs]` (or `[**/obj/**.cs]`) with `dotnet_diagnostic.IDE0005.severity = none`.
- Stop injecting `Microsoft.Extensions.Logging` into *all* test projects; only include it where needed:
  - `src/Directory.Build.props[61-67]` adjust `<Using Include="Microsoft.Extensions.Logging"/>` to be conditional per-project.
- If you truly want IDE0005 as an error for hand-written usings only, keep it as `warning` globally and selectively elevate in projects that don’t use generated global usings.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


# IntelliJ IDEA properties
ij_any_block_brace_style = end_of_line
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
global using NodaTime;
using Eventuous.Tests.Fixtures;
using Eventuous.Sut.App;
using Eventuous.Sut.Domain;
Expand Down
Loading