Hilchos Lashon Hara chapter 4, section 7

The matter of judging to the benefit of the doubt relates specifically to someone who becomes remorseful after committing a sin. But if the observer has examined this person’s lifestyle and determined that he has no fear of G-d and constantly behaves in a style of living that is inimical to the Torah, like one who is contemptuous of Torah and mitzvoth or who considers one particular aveirah to be irrelevant, and that society as a whole knows that this aveirah is forbidden. In this case it is permissible to utterly degrade this person and to disclose his shame privately and publicly. And if this person does anything or says anything that is ambiguous and can be interpreted as decent or as evil, one is obligated to judge this person as evil since he has demonstrated himself clearly to be a Rasha. Chazal have said: “Do not oppress your fellow Jew” meaning one who is with you in Torah and mitzvoth, do not oppress him with your words. But regarding one who closed his heart to Hashem’s Torah, it is permissible to humiliate him through his own actions, to publicize his disgusting lifestyle and to demean him.