Does God judge by inner reality or outward appearance?

Each answer is quoted as it is from the commentary of the Quran, with the passage it comes from.