If one was feeling charitable, it could be said that Sherlock loves the truth, or at least, the pursuit of truth. If one was feeling uncharitable, it could be said that facts and data are not necessarily the same thing as truth.
What is truth? Pontius Pilate’s famous question reverberates through the ages. Some say truth is relative. Some say truth is truth and it doesn’t care what you think of it. Some say each of us has our own truth, and your truth can be different from mine.
Sherlock cares nothing for these questions. To him, truth is cold, hard facts backed up with proof. That’s how he knows that John is his friend: the proof is in the doctor’s actions.
He says he is a sociopath, but the reason he doesn’t turn John in for shooting the cabbie is because that would be the wrong thing to do.