You mean like the Jesus of Matthew 23?
Bible Gateway passage: Matthew 23 - New American Standard Bible
The judge not has to do with judging others according to a self righteousness. It does not mean we as fellow fallen man cannot warn others of God's Holy Standards.
Jesus said in Matthew 5 we should be perfect as our Heavenly Father is perfect. So we do justice by pointing out none of us are perfect and the only One Who walked the Earth perfectly created the way to the Father through the Cross and Empty Tomb.
If we say to our neighbor God will overlook their sin then we lie to them and their blood is on our hands.
Jesus said
"Whosoever therefore shall break one of these least commandments, and shall teach men so, he shall be called the least in the kingdom of heaven: but whosoever shall do and teach them, the same shall be called great in the kingdom of heaven." (Matthew 5:19)
The law reveals our sin.