Skip to content

Conversation

@kubukoz
Copy link
Contributor

@kubukoz kubukoz commented Jul 24, 2025

Issue #, if available:

Description of changes:

Add a diagnostic's hint to the message, if there is one present.

Tested manually. I didn't find any real validations in the Smithy repo that would include a hint, so I don't see an easy way to test this with real diagnostics. Built-in validators like EmitEachSelectorValidator also don't support adding hints.

Is it OK to go without a test? toDiagnostic is in a private interface too, so I can't unit test it without refactoring.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@kubukoz kubukoz requested a review from a team as a code owner July 24, 2025 18:27
@kubukoz kubukoz requested a review from milesziemer July 24, 2025 18:27
@milesziemer
Copy link
Contributor

I didn't even know we had a hint on validation events. Yea, looks like we don't use it anywhere. No test is fine, this is simple enough.

…gnostics.java

Co-authored-by: Miles Ziemer <45497130+milesziemer@users.noreply.github.com>
@milesziemer
Copy link
Contributor

My suggestion failed checkstyle. I'll fix it.

@milesziemer milesziemer merged commit 0342877 into smithy-lang:main Aug 25, 2025
0 of 3 checks passed
milesziemer added a commit to milesziemer/smithy-language-server that referenced this pull request Aug 25, 2025
My suggestion in smithy-lang#230
didn't pass checkstyle.
@milesziemer milesziemer mentioned this pull request Aug 25, 2025
@kubukoz kubukoz deleted the add-hint-to-diagnostics branch August 26, 2025 18:43
milesziemer added a commit that referenced this pull request Aug 26, 2025
My suggestion in #230
didn't pass checkstyle.
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