Gov. Cuomo just couldn’t resist taking the cheap shot — no matter how bad it makes him look.

The gov was commenting on the federal ruling Tuesday that tossed the corruption convictions of ex-state Sen. Dean Skelos and his son Adam. But Cuomo chose to take aim at the guy who’d won those convictions: former US Attorney Preet Bharara.

“Fighting government corruption is right,” the governor said. But “if you’re using the legal system to quote unquote reform government, you have to do it legally.”

Huh? The Skelos verdicts, like the earlier one against ex-Assembly Speaker Sheldon Silver, got upended because the US Supreme Court effectively changed the law after the trials ended.

Even then, tape-recorded evidence seems likely to convict the Skeloses again, and witness testimony may do the same for Silver (if his lawyers can’t delay the retrial until the key witness dies).

Cuomo’s sarcasm (“quote unquote reform government”) is pretty bold for the guy who prematurely shut down his own Moreland Act anti-corruption commission. And did so at the request of Silver and Skelos.

Bharara then rushed in and gathered up the Moreland files for his own investigations, which led to those convictions.

Then again, another Bharara probe has a host of Cuomo donors and aides, including two (formerly) close friends, facing trials of their own for corrupt dealings involving the gov’s “Buffalo Billion” program.

It’s easy to see why Cuomo is bitter here, but he’d be better off not showing it.