Jesus shows a kind of shunning acceptable in the church
Mat 18:15 Moreover if thy brother shall trespass against thee, go and tell him his fault between thee and him alone: if he shall hear thee, thou hast gained thy brother.
Mat 18:16 But if he will not hear thee, then take with thee one or two more, that in the mouth of two or three witnesses every word may be established.
Mat 18:17 And if he shall neglect to hear them, tell it unto the church: but if he neglect to hear the church, let him be unto thee as an heathen man and a publican
Judging matters between brethren and taking it before the unjust rather than before the saints here
1 Cr 6:1 Dare any of you, having a matter against another, go to law before the unjust, and not before the saints?
1 Cr 6:2 Do ye not know that the saints shall judge the world? and if the world shall be judged by you, are ye unworthy to judge the smallest matters?
1 Cr 6:3 Know ye not that we shall judge angels? how much more things that pertain to this life?
1 Cr 6:4 If then ye have judgments of things pertaining to this life, set them to judge who are least esteemed in the church.
1 Cr 6:5 I speak to your shame. Is it so, that there is not a wise man among you? no, not one that shall be able to judge between his brethren?
Shunned for fornication
1 Cr 5:1 is revisted in 2 Cr as it pertains to the man who had his fathers wife and how it was handled foolishly since it was "commonly reported" and how badly they responded to it.
Because at first Paul writes
1 Cr 5:1 It is reported commonly that there is fornication among you, and such fornication as is not so much as named among the Gentiles, that one should have his father's wife.
And this is how their not so wise were handling the situation
1 Cr 5:2 And ye are puffed up, and have not rather mourned, that he that hath done this deed might be taken away from among you.
1 Cr 5:11....I have written unto you not to keep company, if any man that is called a brother be a fornicator, or covetous, or an idolater, or a railer, or a drunkard, or an extortioner; with such an one no not to eat.
1 Cr 5:12 For what have I to do to judge them also that are without? do not ye judge them that are within?
1 Cr 5:13 But them that are without God judgeth. Therefore put away from among yourselves that wicked person.
Whereas in his next letter Paul would say,
2 Cr 2:6 Sufficient to such a man is this punishment, which was inflicted of many.
So this punishment was to be inflicted upon such a man by the many of them together (as a church). They should have been grieved about (concerning this man's fornication). and Paul contniues
2 Cr 2:7 So that contrariwise ye ought rather to forgive him, and comfort him, lest perhaps such a one should be swallowed up with overmuch sorrow.
Their correct response in obedience to Paul had a positive effect on the man
This is what I love about this verse is that Paul is concerned that this mans grief would actually swallow the man up (even as he was made sorry). Its just how Paul expresses his concern for the man who had sinned in this manner.
2 Cr 2:8 Wherefore I beseech you that ye would confirm your love toward him.
2 Cr 2:9 For to this end also did I write, that I might know the proof of you, whether ye be obedient in all things.
Its not really about judge not lest ye be judged there, their obedience played a part in the change in this man.
And they should have been grieved over the sin, just as Paul epresses how he is afraid to feel here writing
2Cr 12:21 And lest, when I come again, my God will humble me among you, and that I shall bewail many which have sinned already, and have not repented of the uncleanness and fornication and lasciviousness which they have committed.
Heres another place by Paul here
2 Thes 3:14 And if any man obey not our word by this epistle, note that man, and have no company with him, that he may be ashamed.
We can judge what someone says,
1 Cr 10:15 I speak as to wise men; judge ye what I say.
1 Cr 14:29 Let the prophets speak two or three, and let the other judge.
Theres at least a few places where it shows judging, and shunning,