You cannot disable certain hints as you can with warnings. Hints are those things that will not have any potential negative consequences for your code at runtime. For example, when you see the prompt “The value assigned to“ varname has never been used, ”this is just an assumption that you should probably“ clear ”in your code, but that will not cause any potential runtime errors ( besides your own logical errors, of course :-). Hints are always best solved by customizing the code.
Warnings, on the other hand, are those things that can lead to unforeseen runtime behavior and indeed . For example, using a variable before assigning it a value is clearly an example of an uninitialized variable, which can lead to "bad things." In the vast majority of cases, warnings should be resolved by “fixing” the code. Even then, under certain circumstances, you may consider the warning “false positive” and you are sure that the code is functioning correctly. In such cases, you can disable a specific warning. Disabling all alerts is dangerous.
source share