Media speculation is growing that President Trump will pardon a number of military personnel convicted of breaching the U.S. Code of Military Justice in Afghanistan and Iraq. But there's a right way and a wrong way for active and retired senior military officers to deal with that possibility.

The wrong way is what former Chairman of the Joint Chiefs of Staff Martin Dempsey said on Tuesday. Tweeting that, "Absent evidence of innocence or injustice the wholesale pardon of US service members accused of war crimes signals our troops and allies that we don’t take the Law of Armed Conflict seriously. Bad message. Bad precedent. Abdication of moral responsibility. Risk to us. #Leadership."

While I broadly agree with Dempsey that a wholesale pardon would be the wrong action, he is the wrong messenger. Don't take my word for it, take Dempsey's. In a 2016 essay, Dempsey warned against retired general officers engaging in political advocacy. As Dempsey put it then, retired officers should avoid political advocacy because "we have a special role in our democracy, and because we will serve whoever is elected ... So retired generals and admirals can but should not become part of the public political landscape. That is, unless they choose to run for public office themselves. That’s different. If they choose to run themselves, they become accountable to voters. In simply advocating -- or giving speeches -- they are not."

The Dempsey of 2016 was right, and 2003 Dempsey's aggressive combat leadership was right, but 2019 Dempsey is wrong. As with former CIA Director John Brennan, Dempsey should keep his views to himself and protect the integrity of the organization he served.

Still, there are good reasons to oppose Trump's mass-pardoning here. Some of the named individuals are deserving of a pardon (as are the Marine snipers convicted of mistreating Taliban bodies), and others deserve a trial before a pardon is considered. But a mass pardon would shred the principle of military law. There is a special absurdity in the suggestion that a Blackwater contractor convicted of shooting numerous civilians might be pardoned.

So what should be done if Trump does pardon all these individuals at once?

Well, I believe that Chairman of the Joint Chiefs of Staff Joe Dunford should, and will, consider resigning. The top ranking U.S. military officer will regard multiple simultaneous presidential pardons as fundamentally detrimental to the U.S. military's integrity. This is not to say that Dunford will become a Trump critic if he does resign, or even that he will openly say why he resigned. The former Marine combat infantry officer is not a politician: He's an old-school Marine, dedicated to the Corps and its central ethos of honor. He is also a veteran of the wars in Afghanistan and Iraq, and keenly aware of the challenges his Marines faced in both theaters.

Dunford may quit out of concern for the Corps' honor, were Trump to pardon all those under consideration. Honor is integral to the Marine identity: imbued in officer candidates from their first day at Quantico. I doubt Dunford would risk its degradation.

Yes, as commander-in-chief, Trump has absolute authority to pardon any military servicemember he wishes. Dunford could not and would not challenge that authority. Any quiet resignation would simply reflect his defense of honor. Dunford's replacement could then continue serving Trump in the best possible faith.