How to test if a variable is been sanitized? I have been doing coder review, and the coder module is showing this complain:

Line 111: Potential problem: drupal_set_message() only accepts filtered text, be sure to
use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized.
drupal_set_message($message);


So my question is if there is a way to test if the variable been sanitized ?. In the past, the coder module have show me false positive, that is why I'm asking how to check if is been sanitized or not.

I have check the entire project and does not have check_plain(), nor  filter_xss().
Your answer is already in the comments by @Geoff and @Clive above. If there was a way to unambiguously detect sanitation status of variables in PHP then the Coder module (and probably some IDE:s) would have incorporated it already.

But in some (not all) instances you can name your variables according to their sanitation status, to make it easier to keep track of which variables are sanitised and which are not.

&lt;?php
  $myVar_raw = some_source();
  $myVar_safe = check_plain($myVar_raw);
  unset($myVar_raw); // Optional, to make sure raw variable is not used again later
?&gt;