What God judges right and counts as righteousness
Thesis VI. There can be no doubt that what God judges rightly done, and what God himself counts as righteousness, is truly good and just. Believers whom God's grace has renewed do what is right in God's judgment, and what they do under the impulse of God's Spirit God counts to them as righteousness.
So in 1 Kings 15 David is said to have done what was right in the Lord's eyes. In chapter 14 of the same book God rebukes King Jeroboam through the prophet: 'You have not been like my servant David, who kept my commandments and followed me with all his heart, doing what pleased me.'
In Psalm 106, what Phinehas did in his zeal to turn away God's anger is said to have been counted to him as righteousness: 'Phinehas stood up,' says the prophet, 'and carried out justice, and made the punishment cease; and it was counted to him as righteousness from generation to generation, for ever.'
Latin
VI. Neque dubium esse potest quin illud vere bonum & justum sit, quod recte factum a Deo judicatur, & quod Deus ipse ad justitiam imputat. At fideles quos Dei gratia renovavit, faciunt quae Dei judicio recta sunt, & quae agunt divino spiritu impellente, ad justitiam ipsis a Deo imputantur. Ita 15. cap. lib. 1. Regum, David dicitur fecisse rectum in oculis Domini. Et Deus ipse in eodem lib. cap. 14. Regem Jeroboham per Prophetam increpans, dicit illi, Non fuisti sicut servus meus David, qui custodivit mandata mea, & secutus est me in toto corde suo, faciens quod placitum esset in conspectu meo. Et Psal. 106. Quod zelo accensus Phinees ad iram Dei placandam aggressus est, dicitur ipsi fuisse ad justitiam imputatum. Stetit Phinees, inquit Propheta, & executus est justitiam: & fecit subsistere ultionem: & reputatum est ei in justitiam in generatione & generationem usque in sempiternum.