Pesachim (113b): There are three types of people that G‑d loves, the one who does not get angry, the one who does not become drunk, and the one who does not insist on his full rights. There are three types of people that G‑d hates, the one says the opposite of what he thinks, the one who has testimony for someone and yet doesn’t testify for him and the one who sees something unseemly in another person and testifies against him as a single witness. For example, It once happened that Toviah sinned and Zigud came alone and testified against him before R’ Papa and R. Papa punished Zigud. Zigud said, “Toviah sinned and yet Zigud is punished?” Rav Papa replied, “Yes Zigud is to be punished because it says in Devarim (19:15), The truth of a matter is not to be established by a single witness. Therefore the only consequence of your testifying as a single witness is that you are slandering Toviah [since no legal action can be done with only a single witness].” Even though as a single witness to another’s sinful behavior you can’t testify against him – but you are allowed to hate him [Rashi]. … But how is it permitted to hate him since Vayikra (19:17) says, “You shall not hate your brother in your heart?” If there are witnesses that he had sinned then everyone hates him – so why say that this person is allowed to hate him? Therefore the case must be that he alone had seen the person sinning and there were not two witnesses. R’ Nachman said that it is not only allowed to hate him but it is a mitzva… Rav Acha asked Rav Ashi, What about telling his teacher that he should hate him? Rav Ashi answered that if his teacher believes his words as if he were two witnesses than he should tell his teacher but if not he is not allowed to tell him.