Radak on Psalms
God is a righteous Judge: – as (in the verse) Judge me, O Lord, according to my righteousness (supra, 5:9); and its interpretation (is): God judges the righteous according to his righteousness and the wicked according to his wickedness, and this is what he means when he says: