I think we need to distinguish between the scriptural gift of discerning of spirits we see in 1 corinthians 12 and this thing some label as the "gift of discernment" that really isn't in the Bible.
I'll cover the 'gift of discernment" first. I think many people claim to have this gift, (that really isn't a listed biblical gift) as a means of being able to read people. They almost act as if they have special powers and can judge the true intents of people. For many, this "gift" is more a gift of being really suspicious about someone without cause, but they justify their unfounded suspicions by appealing to some God given gift from above.
Let's look at the context of the discerning of spirits found in 1 Corinthians 12.
The context is about the local church meeting and exercising the gifts of the Spirit.
Paul says...3Therefore I tell you that no one who is speaking by the Spirit of God says, "Jesus be cursed," and no one can say, "Jesus is Lord," except by the Holy Spirit.
The main thing these folks had to distinguish between was this. Is someone speaking by the Spirit of God or some other spirit?
This is where the 'gift of discerning of spirits' comes in.
9to another faith by the same Spirit, to another gifts of healing by that one Spirit, 10to another miraculous powers, to another prophecy, to another distinguishing between spirits, to another speaking in different kinds of tongues
This gift isn't about magically reading people and getting a feel for who they really are as a person, rather it's a gift that can distinguish whether something being said during the exercising of the gifts of the Spirit is really being said by God.
We really need to be careful about interpreting this gift properly. Many use it to simply black ball people, because they have a 'feeling' about them and they validate that 'feeling' by saying it's the gift of 'discernment'.
The gift of discernment of spirits simply judges if something being said during the use of the gifts of the spirit is from God or the devil. It doesn't give you a magic window into someone's very soul so you can measure and judge EVERY thought and intention of their mind.