Skip to content

Conversation

@henriquemoody
Copy link
Member

This commit addresses the skipped tests by modifying certain core concepts in the library. The way names work has always been somewhat confusing, even to me. I’ve established that existing names will never be overwritten, and if a path is already defined, we will change the name to also include the path.

I’m not very happy with how I’m solving this problem, because the FirstResultStringFormatter is changing some behaviour in the results that seems to be something that should always happen before. But, for the moment, I will keep it as is.

@codecov
Copy link

codecov bot commented Dec 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.48%. Comparing base (0d4a5fe) to head (8332d28).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1568   +/-   ##
=========================================
  Coverage     97.47%   97.48%           
  Complexity      987      987           
=========================================
  Files           205      205           
  Lines          2221     2227    +6     
=========================================
+ Hits           2165     2171    +6     
  Misses           56       56           

☔ 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.

@henriquemoody henriquemoody force-pushed the core/name branch 2 times, most recently from 836fa77 to d679872 Compare December 26, 2025 10:57
This commit addresses the skipped tests by modifying certain core
concepts in the library. The way names work has always been somewhat
confusing, even to me. I’ve established that existing names will never
be overwritten, and if a path is already defined, we will change the
name to also include the path.

I’m not very happy with how I’m solving this problem, because the
`FirstResultStringFormatter` is changing some behaviour in the results
that seems to be something that should always happen before. But, for
the moment, I will keep it as is.
// Message: `.foo` (<- Custom name) must be present
```

If you want to display only a custom name while checking if a key exists, use [Key](Key.md) with [AlwaysValid](AlwaysValid.md):
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if we shouldn't rename Key and Property to KeyValue and PropertyValue, since now they require the value to be present.

Also, while the text is informative, it might be difficult for users to understand when to pick Key, KeyExists and KeyValue just from reading the description.

I was thinking maybe we should do a separate markdown file with some sort of direct comparison (maybe even a table?) of these very similar rules (Key, KeyExists, KeyOptional, Property, PropertyExists, PropertyOptional).

Hopefully, by comparing them directly in a single document, we can better show their differences to users. We can then do a small link here to that doc file (same with Property).

WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not a big fun of renaming the rule because I find it would be too lengthy.

I do agree that users will need more information on those structural rules and I like the extra documentation and the table you suggested!

Copy link
Member

@alganet alganet left a comment

Choose a reason for hiding this comment

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

The comment I left on the docs is non-blocking and an improvement that we can later work on. Overall, seems good!

@henriquemoody henriquemoody merged commit 8332d28 into Respect:main Dec 26, 2025
5 checks passed
@henriquemoody henriquemoody deleted the core/name branch December 26, 2025 16:33
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.

2 participants