I will look with favor on the faithful in the land,
that they may dwell with me;
he who walks in the way that is blameless
shall minister to me. —Psalm 101:6.
Every relationship has consequences: "Bad company ruins good morals" Paul wrote, quoting Menander, a Greek playwright (1Corinthians 15:33). Thus it's important to be discriminating in our friendships for we're all influenced by our friends.
David sought out "the faithful in the land." In the same way, it's good for us to seek those who seek God and who will direct our thoughts toward Him. There's an old Quaker saying: "Cling to those that cling to God that they may draw you unto God."
This is not to say that we can't be friends with those that do not seek God; Jesus was "the friend of sinners." But if our heart's desire is to know and love God then our closest friends and those we follow most closely should be so inclined.
There are some folks that will never be good friends: "Whoever slanders his neighbor secretly... Whoever has a haughty look and an arrogant heart I cannot endure" (101:5).
We should avoid those who tear down the reputations of others. They're insecure, threatened people and can be very dangerous. You can count on it: If they slander their neighbors they will slander you.
The translation "arrogant heart" is an attempt to render a Hebrew idiom, "a broad heart"—someone full of himself, I suppose. Thus we need to avoid entangling alliances with self-centered people.
There are who come to me, and write, and send,
Whom I would love, giving good things to all,
But “friend”—that name I cannot on them spend:
‘Tis from the centre of self–love they call. —George MacDonald
"No one who practices deceit shall dwell in my house; no one who utters lies shall continue before my eyes" (Psalms 101:7). Honesty is not the best policy; it's the only policy. "One lie, you die," is an old saying, an indictment that may seem harsh, but it's a practical consideration. Once someone deceives us we can and should forgive, but it's difficult to fully trust them again.
Finally, to turn the matter around, I must begin, with God's help, to deal with my own arrogance and duplicity, for humility and honesty are indispensable attributes of a friend. The words of an old proverb come to mind: "If you want to have good friends, you must first be one."