The Qur'an does mention Imam Ali (a) in numerous places. But it does not mention him by name. Being mentioned in the Qur’an is distinct from being mentioned by name in the Qur’an.
Let's analyse both types of mention and try and determine the style of the Qur'an in these matters.
Mention By Name
Should we believe that being mentioned by name in the Qur’an is an honour? Well, Abu Lahab is mentioned by name in a verse that reprimands him and his wife and assures of their place in hellfire.
Clearly, then, being mentioned in the Qur’an by name is not necessarily an honour.
Now, let’s turn to the virtuous people who are mentioned by name. If it was the mere incidence of them being named that was a token of superior merit, then Prophet ‘Isa (a) - Jesus - is mentioned by name more often than Prophet Muhammad (s) is referred to by his blessed name.
Clearly, then, being mentioned in the Qur’an by name does not mean anything other than that God in His infinite wisdom decided that it was appropriate in the context of the various narratives contained in the Holy Book.
This brings us to the other type of mention in the Qur’an.
Mention By Attribute
Many important people are mentioned by attributes and it is clear from the tafsir literature who those people are. With that certainty, we can say that those people are mentioned by the Qur’an.
Let’s start with two well-known Companions who were the reason why the first few verses of Surah al-Hujurat were revealed.
Abu Bakr and ‘Umar Mentioned In The Qur’an
Narrated `Abdullah bin Az-Zubair: A group of Bani Tamim came to the Prophet (and requested him to appoint a governor for them).
Abu Bakr said, "Appoint Al-Qaqa bin Mabad." `Umar said, "Appoint Al-Aqra' bin Habeas."
On that Abu Bakr said (to `Umar). "You did not want but to oppose me!" `Umar replied "I did not intend to oppose you!"
So both of them argued till their voices grew loud. So the following Verse was revealed: 'O you who believe! Be not forward......' (49.1)
Source - Sahih al-Bukhari, Book 65, Hadith 4847
The full verse that was revealed mentioning by attribute Abu Bakr and ‘Umar was
O you who have believed, do not put [yourselves] before Allah and His Messenger but fear Allah. Indeed, Allah is Hearing and Knowing. (49:1)
There are others but let’s move on.
Imam ‘Ali Mentioned In The Qur’an
In the same way, Imam ‘Ali b. Abi Talib is also mentioned in multiple places in the Qur’an but always in a favourable and praiseworthy light.
And this is by absolute consensus of all Muslims, Sunni’s and Shi’a. Nobody is able to show a mention of ‘Ali in the Qur’an that reprimanded him for anything or criticised him.
The number of verses that mention him are really a huge number. Entire books have been written that list the verses in ‘Ali’s favour and the evidence from Sunni sources that prove it.
Here is one example from the occasion of Mubahala.
Amir b. Sa'd b. Abi Waqqas reported on the authority of his father that Muawiya b. Abi Sufyan appointed Sa'd as the Governor and said:
What prevents you from abusing Abu Turab (Hadrat 'Ali), whereupon be said:
It is because of three things which I remember Allah's Messenger (s) having said about him that I would not abuse him and even if I find one of those three things for me, it would be more dear to me than the red camels.
I heard Allah's Messenger (s) say about 'Ali as he left him behind in one of his campaigns (that was Tabuk). 'Ali said to him: Allah's Messenger, you leave me behind along with women and children. Thereupon Allah's Messenger (s) said to him: Aren't you satisfied with being unto me what Aaron was unto Moses but with this exception that there is no prophethood after me.
And I (also) heard him say on the Day of Khaibar: I would certainly give this standard to a person who loves Allah and his Messenger, and Allah and his Messenger love him too. He (the narrator) said: We had been anxiously waiting for it, when he (the Holy Prophet) said: Call 'Ali. He was called and his eyes were inflamed. He applied saliva to his eyes and handed over the standard to him, and Allah gave him victory.
(The third occasion is this) when the (following) verse was revealed: "Let us summon our children and your children." Allah's Messenger (s) called 'Ali, Fatima, Hasan and Husain and said: O Allah, they are my family.
Source - Sahih Muslim, Book 031, Number 5915
Here is the full Qur’anic verse that mentions - as confirmed by Sahih Muslim - not just Imam ‘Ali but also Lady Fatima and Imams al-Hasan and al-Husayn.
The truth is from your Lord, so do not be among the doubters. Then whoever argues with you about it after [this] knowledge has come to you - say, "Come, let us call our sons and your sons, our women and your women, ourselves and yourselves, then supplicate earnestly [together] and invoke the curse of Allah upon the liars [among us]." (3:60–1)
Th Qur’an not only mentioned Imam ‘Ali (a) but called him the self of the Prophet Muhammad (s). And it also confirmed that they were all on the position of utmost truthfulness and piety.
And those against them are the liars and the curse of God is upon them!