1 Kings 15:5

For David had done what was right in the eyes of the Lord, and he had not declined from all of the things that he had instructed to him, during all the days of his life, except the matter of Uriah, the Hittite

Other versions

King James Version

Because David did that which was right in the eyes of the LORD, and turned not aside from any thing that he commanded him all the days of his life, save only in the matter of Uriah the Hittite.

English Standard Version

because David did what was right in the eyes of the LORD and did not turn aside from anything that he commanded him all the days of his life, except in the matter of Uriah the Hittite.

New International Version

For David had done what was right in the eyes of the LORD and had not failed to keep any of the LORD's commands all the days of his life-except in the case of Uriah the Hittite.