Formality shown by inspector with attitude (8)
I believe the answer is:
distance
'formality' is the definition.
(ie acting distant or detached)
'inspector with attitude' is the wordplay.
'inspector' becomes 'di' (I've seen this in other clues).
'with' says to put letters next to each other.
'attitude' becomes 'stance' (stance is a kind of attitude).
'di'+'stance'='DISTANCE'
'shown by' acts as a link.
(Other definitions for distance that I've seen before include "Full extent of fighting" , "See 3" , "Length between points - remoteness" , "Space between two objects or points" , "Aloofness, reserve" .)