What do you call it when someone says they’re not going to mention a thing? [duplicate]

Is there a name for the sort of expression where someone would say something like...

“I’m not going to mention the ridiculous hat they’re wearing.”

Or

“I could make a joke about footballers diving around on the floor after smaller incidents, but I won’t.”

By saying they’re not going to mention a topic they have mentioned the topic.

It’s used fairly often so I was wondering if there is a word or name for this kind of phrase?


apophasis

the raising of an issue by claiming not to mention it (as in "we won't discuss his past crimes")