In the days of Noah, God condemned the world because “every intention of the thoughts of his heart was only evil continually” - so thoughts matter as much as actions. Noah and his family were spared because of his righteousness. Hebrews says, he “became an heir of the righteousness that comes by faith” so his righteousness was inherited by faith, not earned by keeping a set of rules. That faith is the antithesis of the evil intentions of the heart of Noah’s contemporaries and it is faith, not righteousness, that God celebrates. In fact, righteousness only comes by faith.