Rom. 3:19-20 Obviously, the law applies to those to whom it was given, for its purpose is to keep people from having excuses and to bring the entire world into judgment before God. For no one can ever be made right in God's sight by doing what his law commands. For the more we know God's law, the clearer it becomes that we aren't obeying it.
The law was given by God to keep people from having excuses for their sins and to show everyone that they are facing the judgment of God. The law clearly states that those who keep it are made righteous before God. The catch is that no one is able to keep the law perfectly. No matter how hard a person may try to live by the law, he will fail miserably and fall short of God's perfect standard.
Paul makes it even harder when he says that the more we discover about God's law, the clearer it becomes that we are not doing it. The law of God is very demanding and to fail at just one point makes us guilty of breaking the whole law.
Even if by some miracle someone were to be able to perfectly obey the law, Jesus makes it even harder when He made it clear that God judges the motives of the law as well as the letter of the law. Why we do what we do matters as much as what we do. And, no one can honestly say that they always do the right thing with the right attitude.
Our righteousness is never in what we do or don't do; it's only in Christ. The soul is made right with God only through the finished work of redemption of Christ on the cross of Calvary. So, if you are trying to make things right with God by what you do, stop it now and trust in Christ alone. He alone can save you and keep you saved.