-
-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Description
When using TUnit to generate code files, some of the generated files occasionally contain duplicated code lines. This leads to compilation issues and requires manual cleanup.
Steps to Reproduce:
- Generate code files using TUnit (please specify which template or command you used, if possible).
- Inspect the generated file.
- Observe that some lines appear more than once in succession.
Expected Behavior:
Generated files should not contain duplicated code lines. Each line of code should only appear once, as defined by the template.
Actual Behavior (Example):
Below is an example of a generated file that contains duplicated lines:
// <auto-generated/>
#pragma warning disable
// <auto-generated/>
#pragma warning disable
#nullable enable
namespace TUnit.Generated;Environment:
- TUnit version: 0.61.13
- .NET version: .NET 6, .NET 7, .NET 8, .NET 9, .NET 10
- OS: Windows and Linux
Additional Context:
This issue does not occur consistently but happens often enough to impact usability. It might be related to the template rendering logic.
Metadata
Metadata
Assignees
Labels
No labels