Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore known annotations in parameter binding #89

Merged
merged 1 commit into from
Dec 5, 2023
Merged

Ignore known annotations in parameter binding #89

merged 1 commit into from
Dec 5, 2023

Conversation

geoand
Copy link
Collaborator

@geoand geoand commented Dec 4, 2023

Fixes: #88

@geoand geoand requested a review from a team as a code owner December 4, 2023 15:29
if (name.startsWith("kotlin")) {
return false;
}
if (name.endsWith("NotNull")) {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if you should ignore everything under jakarta.validation.constraints. instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, I'll add that as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

NotNull are super common - most tools even allow custom ones, so I'll leave the rule here

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was wondering if we shouldn't add CheckReturnValue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That is only for return values, no?

Copy link
Member

Choose a reason for hiding this comment

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

Jakarta Validation also has @NotBlank which could be useful in this case. Thus my recommendation.

You can keep not null as is but I would also ignore everything under jakarta.validation.constraints.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👌, already added 😉

@geoand geoand merged commit bdbf7f0 into main Dec 5, 2023
2 checks passed
@geoand geoand deleted the #88 branch December 5, 2023 07:17
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.

Qute templating error when using Kotlin
3 participants