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

Fix FP S3800 (function-return-type): Exception for sanitation functions #4548

Merged
merged 1 commit into from Feb 5, 2024

Conversation

ericmorand-sonarsource
Copy link
Contributor

Fixes #4527

@@ -1,37 +1,5 @@
{
"vuetify:packages/docs/src/examples/v-date-picker/event-events.vue": [
44
],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For information, I checked all the removed lines and can confirm that they are not triggering the rule anymore - they all belong to a sanitation function.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -468,13 +491,6 @@ ruleTesterTs.run(`Functions should always return the same type [ts]`, rule, {
},
],
},
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test was moved from the invalid list to the valid one.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -533,6 +549,14 @@ ruleTesterTs.run(`Functions should always return the same type [ts]`, rule, {
},
],
},
{
code: `
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this test to guarantee that only functions with true and string return types are valid.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM!

@@ -1,37 +1,5 @@
{
"vuetify:packages/docs/src/examples/v-date-picker/event-events.vue": [
44
],
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -468,13 +491,6 @@ ruleTesterTs.run(`Functions should always return the same type [ts]`, rule, {
},
],
},
{
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -533,6 +549,14 @@ ruleTesterTs.run(`Functions should always return the same type [ts]`, rule, {
},
],
},
{
code: `
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@ericmorand-sonarsource ericmorand-sonarsource merged commit dd9c5bc into master Feb 5, 2024
24 checks passed
@ericmorand-sonarsource ericmorand-sonarsource deleted the issue-4527 branch February 5, 2024 09:45
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.

Fix FP S3800 (function-return-type): Exceptions sanitation functions
2 participants