Once, sort of, at Salmon Idaho. But as he had illegally opened the door of my plane to stick his head in and roused the ire of a local pilot who had "issues" with this inspector, it quickly changed into a different situation.
As the Fed walked towards us, the local threatened him with bodily harm if he didn't turn around and walk off, a baseball bat was mentioned. I kid you not

This had the effect of the Fed's attention switching from me (no name or ID was ever asked or offered, so I skated on the whole deal) to the baseball bat owner and his personal wellfare, and he did indeed get the heck out of there posthaste. One of my scariest moments in aviation, I was just the innocent bystander and never said a word! I'm NOT saying threaten them with a bat, not at all, brown nosing works better is my guess, but the local had good results that time with his particular approach. I never heard back on this, don't know what happened, but I got out of there ASAP. I still can't quite believed it happened like i just told it, but TRUE STORY. 15 years or more ago or so.
So, for me anyway, none times since '88 (licensed) flying since '72 but just hang gliders and ultralights.