Matthew 7:1-2
Judge not that ye be not be judged. For with what judgement ye judge, ye shall be judged: and with what measure ye mete, it shall be measured to you again.
At what measure do you judge, or do you judge at all? Does it extend only to the length to which you have sinned, or does it go beyond that? Who do you judge, being those who are saved, those who are not, or both? What is the division line between judgement and concerned criticism?
What our Lord Jesus is talking about is righteous judgment.
John 7:24
24 Judge not according to the appearance, but judge righteous judgment.
(KJV)
John 8:15-16
15 Ye judge after the flesh; I judge no man.
16 And yet if I judge, My judgment is true: for I am not alone, but I and the Father That sent Me.
(KJV)
Isa 11:3-5
3 And shall make him of quick understanding in the fear of the LORD: and he shall not judge after the sight of his eyes, neither reprove after the hearing of his ears:
4 But with righteousness shall he judge the poor, and reprove with equity for the meek of the earth: and he shall smite the earth with the rod of his mouth, and with the breath of his lips shall he slay the wicked.
5 And righteousness shall be the girdle of his loins, and faithfulness the girdle of his reins.
(KJV)
Prov 24:19-25
19 Fret not thyself because of evil men, neither be thou envious at the wicked;
20 For there shall be no reward to the evil man; the candle of the wicked shall be put out.
21 My son, fear thou the LORD and the king: and meddle not with them that are given to change:
22 For their calamity shall rise suddenly; and who knoweth the ruin of them both?
23 These things also belong to the wise. It is not good to have respect of persons in judgment.
24 He that saith unto the wicked, Thou are righteous; him shall the people curse, nations shall abhor him:
25 But to them that rebuke him shall be delight, and a good blessing shall come upon them.
(KJV)
Prov 17:15
15 He that justifieth the wicked, and he that condemneth the just, even they both are abomination to the LORD.
(KJV)
Deut 16:18-20
18 Judges and officers shalt thou make thee in all thy gates, which the LORD thy God giveth thee, throughout thy tribes: and they shall judge the people with just judgment.
19 Thou shalt not wrest judgment; thou shalt not respect persons, neither take a gift: for a gift doth blind the eyes of the wise, and pervert the words of the righteous.
20 That which is altogether just shalt thou follow, that thou mayest live, and inherit the land which the LORD thy God giveth thee.
(KJV)
Deut 1:16-17
16 And I charged your judges at that time, saying, Hear the causes between your brethren, and judge righteously between every man and his brother, and the stranger that is with him.
17 Ye shall not respect persons in judgment; but ye shall hear the small as well as the great; ye shall not be afraid of the face of man;
for the judgment is God's: and the cause that is too hard for you, bring it unto me, and I will hear it.
(KJV)
The matter involves both discernment and judgments against wickedness, and it's all to be according to WHAT GOD SAYS, not what the wicked say, and without respect of persons, without taking of bribes, etc.