I don't know any specific case about about the Spanish (although Wellington writes to Freire (?) with grievances as to the discipline, or lack of), but as I mentioned in another post, a Portuguese Caçador (light infantry) was courtmartialled and hung for having killed 'business-like' an entire family in the first French farm he came about, as revenge for his family being killed in Massena's retreat in 1811. I believe this set the general tone for future similar situations.
Jorge