Tilting at windmills
Tilting at windmills is an English idiom which means attacking imaginary enemies. The word "tilt", in this context, comes from jousting.
The phrase is sometimes used to describe confrontations where adversaries are incorrectly perceived, or courses of action that are based on misinterpreted or misapplied heroic, romantic, or idealistic justifications. It may also connote an importune, unfounded, and vain effort against confabulated adversaries for a vain goal.