Imam Sadiq [a] said: "He who seeks the company of those who insult the lovers of Allah has surely disobeyed Him, the Sublime."
Usul-i-Kafi, vol. 2, p. 379Imam Sadiq [a] said: "When you are informed of a fellow companion committing an evil action, then go to him and tell him: 'O so and so! Either refrain from committing this sin or keep away from us'; then, avoid him unless he does so."
Wasa'il-ush-Shi'ah, vol. 16, p. 146
Imam Sadiq [a] has narrated from his father Imam Muhammad Baqir [a] who said his father Ali ibn Husayn [a] stated: "O' my son! Beware of five (groups) and do not seek companionship with them, do not speak with them, and do not make friends with them on (the) way."
Then, Imam Baqir [a] asked his father who they were and might he introduce them to him. He responded:
They are: (Sura AI-Baqarah, No.2, verse 27; Sura Ar-Ra'd, No.13, verse 25; and Sura Muhammad, No.47, verse 22).
Al-Kafi, vol. 2, p. 641
Imam Amir-ul-Mu'mineen Ali [a] said: "O' Kumayl! Say what is just in any condition. Be friends with the righteous and avoid the evil doers, stay away from the hypocrites and do not accompany the treacherous."
Mustadrak-ul-Wasa'il, vol. 12, p. 197