As I posted in another section of this thread, I found in Pelet's memoirs where Massena did order his corps commanders to maintain discipline in Portugal and put some of the page numbers to help. If I recall correctly for Badajoz, Wellington had a gallows erected but it wasn't used, or it was only used a few times (I cannot recall which at the moment and can't find the reference).
Sincerely,
Kevin