Isn’t Rio Bravo the one with the line: “Badges? We don neeed no steeenking BADGES!”
That’s from “Treasure of the Sierra Madre.” And later reused in the spoof western “Blazing Saddles”.