Skip to content

Conversation

@alexanderlinne
Copy link
Collaborator

  • Refactors the Attribute(s)With(Named)Arguments fluent syntax methods and reduce code duplication by refactoring common logic into helper methods.
  • For AttributesWithArguments we only keep the IEnumerable<object> overload and remove the params object[] overload to remove the type ambiguity.

@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 96.76806% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.71%. Comparing base (bb4b5d6) to head (2edbb5a).

Files with missing lines Patch % Lines
...uent/Syntax/Elements/ObjectConditionsDefinition.cs 96.92% 0 Missing and 9 partials ⚠️
...uent/Syntax/Elements/ObjectPredicatesDefinition.cs 94.16% 0 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #432      +/-   ##
==========================================
- Coverage   74.86%   73.71%   -1.15%     
==========================================
  Files         257      258       +1     
  Lines       17221    16374     -847     
  Branches     1575     1338     -237     
==========================================
- Hits        12892    12070     -822     
- Misses       3873     3887      +14     
+ Partials      456      417      -39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexanderlinne alexanderlinne force-pushed the refactor/attribute-with-arguments-syntax-elements branch from 38d7e45 to 2edbb5a Compare November 28, 2025 12:33
@@ -0,0 +1,48 @@
using System;
Copy link
Collaborator

@mak638 mak638 Nov 29, 2025

Choose a reason for hiding this comment

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

nitpick: using System; is unnecessary

{
var attArguments = instance
.GetAllNamedAttributeArgumentTuples()
.ToList();
Copy link
Collaborator

@mak638 mak638 Nov 29, 2025

Choose a reason for hiding this comment

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

I noticed you are using .ToList() in many places in this file where it would not be necessary. Maybe it would be worth it to have a second look as leaving out the unnecessary conversions into lists could increase the performance massively.

return $"{instance.Type.FullName} {argumentsDescription}";
});
var failDescription = argumentsDescriptions.FormatDescription(
"does not have any attribute",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: Missing 's' at the end - "does not have any attributes"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants