Doing the will of God includes having faith and doing what God is pleased with. The expression is comprehensive. It is not at all about outward action without sincere heart nor just intellectual faith that does not move the person to act. Doing the will of God is the most precise expression to discuss righteousness.
Doing the will of God should not be confused with the “works of the law” against which apostle Paul argues in some of his letters. Unfortunately, the misunderstanding has led people to both extreme: One, not doing anything but just believing and the other, doing everything without heart but just legalistically. There are at least two reasons, however, that doing the will of God cannot be confused with the works of the law (doing without heart) and with just believing without doing. First, doing the will of God clearly means, in terms of object of doing, what one has to do is what God would be pleased with. The will (theleima in Greek) means what one wants or desires or is pleased with (cf. Matt. 9:13). Therefore, it excludes anything that God would not be pleased with. Second, doing the will of God also means, in terms of mode of doing, the way how one does something has to be pleasing to God. This excludes anything that is done without heart put into it, because God sees heart. Therefore, the expression, doing the will of God, excludes works without heart and just believing without works.
Therefore, the expression, doing the will of God, has nothing lacking as to necessarily qualifies a person to be righteous. It is comprehensive and the most precise expression that can be used in discussing righteousness. Maybe this is why Jesus used the expression many times such as in Matt. 6:10, 7:21, 12:50, 18:14, 21:31, 26:42 Luke 12:47, John 4:34, 5:30, 6:38, and 7:17. Doing the will of God, in this regard, means “practicing righteousness” 1 John 3:7, “Whoever practices righteousness is righteous. In other words, doing the will of God is righteousness.