The Apostle Paul warned the Corinthians not to be too harsh in their shunning of a man who was guilty of sexual immortality / adultery:
2 Co 2:5-11: Now if anyone has caused sadness, he has saddened, not me, but all of you to an extent—not to be too harsh in what I say. This rebuke given by the majority is sufficient for such a man; now you should instead kindly forgive and comfort him, so that he may not be overwhelmed by excessive sadness.
I therefore exhort you to confirm your love for him. For this is also why I wrote to you: to determine whether you would give proof of your obedience in all things.
If you forgive anyone for anything, I do also. In fact, whatever I have forgiven (if I have forgiven anything) has been for your sake in Christ’s sight, so that we may not be overreached by Satan, for we are not ignorant of his designs.
--------
Otherwise, Paul said, if you are not forgiving, but are harsh, then you've been overreached by Satan.
Also, look at Paul's command regarding those who are disobedient to his inspired letters:
2 Thessalonians 3:14-15: But if anyone is not obedient to our word through this letter, keep this one marked and stop associating with him, so that he may become ashamed. And yet do not consider him an enemy, but continue admonishing him as abrother.