Republican Charlie Dent is a former US congressman from Pennsylvania who served as chairman of the House Ethics Committee from 2015 until 2016 and chairman of the House Appropriations Subcommittee on Military Construction, Veterans Affairs and Related Agencies from 2015 until 2018. He is currently a CNN political commentator. The views expressed in this commentary are his own. View more opinion on CNN.

(CNN) No one runs for Congress intending to serve on the House Ethics Committee. At least I know I didn't.

I served on the committee for eight years, including two years as chairman. Enforcing House rules and standards of conduct on one's colleagues and their staffs is a thankless but necessary task and can make for some uncomfortable elevator rides with colleagues under investigation.

Charlie Dent

The job will not win a committee member any popularity contests; it's the congressional equivalent of a police department's internal affairs division.

In fact, when Speaker John Boehner first tapped me in 2009 to serve on the Ethics Committee, two House Democratic colleagues who had learned of my appointment approached me on the House floor with a message specifically for me from legendary Congressman Jack Murtha: "We don't want anybody on the Ethics Committee who wants to be on the Ethics Committee," is what Murtha had told them to relay. Message received.

This often-difficult and rewarding job taught me something about how elected officials should conduct themselves in office, and that experience informs my judgment on President Trump and the current impeachment inquiry . I learned to distinguish between serious ethical and sometimes legal entanglements and frivolous or unfair ones, and how to safeguard the rights of those under investigation, who are at risk for potentially irreparable reputational damage.