Is it permissible to deal with those who commit sins in public?

Question 421: What is the appropriate limit of Al-Walaa’ Wa Al-Baraa’ (loyalty and disassociation for Allaah’s Sake) as regards Muslims who commit sins such as singing, shaving the beard, smoking, snuffing, Isbaal (lengthening and trailing clothing below the ankles), etc.? Must we boycott them if they do not respond to advice?

Answer: It is not permissible to deal with those who commit sins in public unless you aim at counseling them, knowing that your advice will affect them positively. They should be loved in proportion to the strength of their belief in Allaah, and they should be resented in proportion to the seriousness of their sins. If they do not accept the advice, they should be abandoned according to Sharee`ah (Islaamic law) until they repent to Allaah... read more here.