Flatulation??? Farting??? I think you've used the wrong word; I think you mean 'flagellation'
During the middle ages, when the Bubonic plague was killing so many people, a group of individuals known as flagellants emerged whose aim was to dispel fear of the clergy. The flagellants placed blame on Gods wrath, and insisted that it was the sins of men and women that compelled God to punish them. The efforts of the flagellants began in Perugia and Central Italy in 1260, and their message soon spread north to other parts of Europe.
The Flagellation refers in a Christian context to the Flagellation of Christ, an episode in the Passion of Christ prior to the Jesus' crucifixion. The practice of mortification of the flesh for religious purposes was utilized by some Christians throughout most of Christian history, especially in Catholic monasteries and convents.
In the 13th century, a radical group of Christians, known as the Flagellants, took this practice to an extreme. The Flagellants were later condemned by the Catholic Church as a cult in the 14th century. Self-flagellation remains common in the Philippines and Latin America.
Some members of strict monastic orders, and some members of the lay organization Opus Dei, practice mild self-flagellation using an instrument called a "discipline", a cattail whip usually made of knotted cords, which is flung over the shoulders repeatedly during private prayer. The practice has become rare within the Catholic Church
In the Islam religion, flagellation is a form of punishment used in certain cases under Islamic Sharia law. In Islam, lashes for punishment are to be performed with a book under one arm to minimize the swing, are not supposed to leave permanent scars, and when the number of lashes is high, are frequently done in batches to minimize risk of harm.
In some Shi'ite communities worldwide, Shi'ites march in massive parades while flogging themselves on the back with knives, blades and chains every year to commemorate the martyrdom of Hussein. This happens in many countries of the world including India, Pakistan, Iraq and Lebanon. In Iran there is an unannounced ban on the use of knives and sharp blades for Mätam or flagellation but chains can be used. In hard-line Salafi countries like Saudi Arabia these practices are strictly forbidden in every form, which, by many Shi'ites is considered a severe violation of Human Rights and religious freedom.
Hope this helps.