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

[TAINT] report invalid psalm-taint-sink #7046

Closed
staabm opened this issue Dec 2, 2021 · 4 comments · Fixed by #10699
Closed

[TAINT] report invalid psalm-taint-sink #7046

staabm opened this issue Dec 2, 2021 · 4 comments · Fixed by #10699

Comments

@staabm
Copy link
Contributor

staabm commented Dec 2, 2021

would be great, psalm would error when using psalm-taint-sink without providing the param name.

this should error

/**
 * @psalm-taint-sink sql
 */
fuction query($query) {
}

because it is missing the $query:

done right it would be:

/**
 * @psalm-taint-sink sql $query
 */
fuction query($query) {
}

I feel from a DX perspective it should be handled similar to forgetting the parameter reference in a @param

@orklah
Copy link
Collaborator

orklah commented Dec 2, 2021

That should be easy to change here:

You should be able to throw a IncorrectDocblockException here to make sure this case doesn't happen

@staabm
Copy link
Contributor Author

staabm commented Dec 2, 2021

Will send a PR tomorrow

@weirdan
Copy link
Collaborator

weirdan commented Feb 12, 2024

Will send a PR tomorrow

@staabm It must have been lost somewhere; feel free to resend 😁

@staabm
Copy link
Contributor Author

staabm commented Feb 12, 2024

thanks for the reminder

;-)

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

Successfully merging a pull request may close this issue.

3 participants