The No True Scotsman fallacy is an informal fallacy in debate or argument. It seeks to rehabilitate a general position when a counter-example is given against that position, by redefining the terms in the general position to exclude the counter-example.
Atheists and agnostics have frequently run into a subset of the fallacy informally dubbed The No True Christian fallacy. Of note, it could be used to rehabilitate nearly every general position: It has even been used by political pundits to try to rehabilitate the idea that democracies do not start wars, by claiming so-called mature democracies do not start wars, thus the immature democracy is not a true democracy—by that definition, the United Kingdom and the United States are not so-called mature democracies because both nations have started wars.
The fallacy is attributed to British philosopher Antony Flew. He wrote in his 1975 book "Thinking about Thinking" the following story to describe the fallacy:
Imagine Hamish McDonald, a Scotsman, sitting down with his Glasgow Morning Herald and seeing an article about how the "Brighton Sex Maniac Strikes Again". Hamish is shocked and declares that "No Scotsman would do such a thing." The next day he sits down to read his Glasgow Morning Herald again; and, this time, finds an article about an Aberdeen man whose brutal actions make the Brighton sex maniac seem almost gentlemanly. This fact shows that Hamish was wrong in his opinion, but is he going to admit this? Not likely. This time he says: "No true Scotsman would do such a thing."
The argument is usually employed by Christians arguing against each other – for instance Mormons are not true Christians, Catholics are not true Christians, &c. Those groups use the Bible and accept Jesus and worship just as any other Christian does. The issue is they don't worship in the same manner or believe the same things as the apologist. It is also used by liberal Protestant denominations against Fundamentalist ones, and vice versa. All of them are trying to exclude counter-examples to rehabilitate what their general definition of a Christian is.
The argument is also used against atheists and agnostics when those groups point out an action or position taken by a church or person that seems to go against the Bible or that person's professed faith. For example, many Catholic priests have been accused of sexual assault on minors. Many Protestants will immediately chime in when this is pointed out "Catholics are not true Christians."
When similar actions are then pointed out about Protestant preachers, they then are also painted as "no true Christian.
This doesn't just apply to sexual assaults. In the recent Charleston AME Church shooting and the Sutherland Springs, Texas church shooting, many Christians immediately tried to pin the blame the shooting by stating the shooters were atheists, or blaming a lack of government-mandated prayer in secular schools. When the murders' own churches denounced their actions, the arguments immediately shifted to "the shooters were no true Christians."
This is also seen in arguments over gay rights and same-sex marriage. Even within a nominally "liberal" church such as the Anglican Communion (the worldwide body of Anglican churches), the Episcopal Church (the United States' Anglican Church) was censured for a "fundamental departure from the faith and teaching of the majority of our provinces." (Essentially, the Episcopal Church took a position "no true Anglican" would take by welcoming LGBT persons into their congregations, and ordaining such people as priests.)
Anglican Leaders Censure Episcopal Church for Stance on Homosexuality (2014)
Another example is the Metropolitan Community Church. It is a worldwide Protestant denomination, considered very liberal, which specifically has an outreach programme for LGBT individuals. This does not mean you have to be an LGBT person to be a member of the church. Disclaimer: When I lived in Omaha, I would frequently work with the MCC there in their morning breakfast kitchen to feed the homeless, even though I'm an atheist.
The Metropolitan Community Church has observer status in the World Council of Churches and is denied entry into the US National Council of Churches. Due to their inclusive stance on LGBT persons, they are "no true Christians" and thus denied entry into those ecumenical organisations. The argument against the MCC is that its position is in opposition to what the Bible teaches, the same position the Anglican Communion argues against the Episcopal Church.
The No True Christian fallacy is what creates schisms within churches, and ofttimes creates piles of dead people (see the Thirty Years' War, the Troubles in Northern Ireland, &c). It also excuses the misdeeds of a church body by claiming the perpetrators were no true Christians when they're caught (such as covering up fraud or sex crimes).