1 Kings 15:5

5 because David did what was right in the Lord's eyes, and he did not turn aside from anything He had commanded him all the days of his life, except in the matter of Uriah the Hittite.

1 Kings 15:5 Meaning and Commentary

1 Kings 15:5

Because David did that which was right in the eyes of the Lord,
&c.] With respect to worship: and turned not aside from anything that he commanded him all the days of his life; especially in matters of religion, nor even in his moral walk and conversation, deliberately, studiously, and with design:

save only in the matter of Uriah the Hittite;
the killing of him, and other sins which led on to it, and were in connection with it; Abarbinel thinks, because the affair of Bathsheba is not mentioned, that was not reckoned to David as a sin; but no doubt it was, and is included here.

1 Kings 15:5 In-Context

3 Abijam walked in all the sins his father had done before him, and he was not completely devoted to the Lord his God as his ancestor David had been.
4 But because of David, the Lord his God gave him a lamp in Jerusalem to raise up his son after him and to establish Jerusalem
5 because David did what was right in the Lord's eyes, and he did not turn aside from anything He had commanded him all the days of his life, except in the matter of Uriah the Hittite.
6 There had been war between Rehoboam and Jeroboam all the days of Rehoboam's life.
7 The rest of the events of Abijam's [reign], along with all his accomplishments, are written about in the Historical Record of Judah's Kings. There was also war between Abijam and Jeroboam.
Holman Christian Standard Bible ® Copyright © 2003, 2002, 2000, 1999 by Holman Bible Publishers.  Used by permission.  All rights reserved.