That would indeed be a bad look for a Buddhist, to fight such a violent war. Any sources which specifically say he was a Buddhist before the Kalinga war?
"On the other hand, the Sri Lankan tradition suggests that Ashoka was already a devoted Buddhist by his 8th regnal year, converted to Buddhism during his 4th regnal year, and constructed 84,000 viharas during his 5th–7th regnal years.[89] The Buddhist legends make no mention of the Kalinga campaign.[91]
Based on Sri Lankan tradition, some scholars, such as Eggermont, believe Ashoka converted to Buddhism before the Kalinga war.[92] Critics of this theory argue that if Ashoka were already a Buddhist, he would not have waged the violent Kalinga War. Eggermont explains this anomaly by theorising that Ashoka had his own interpretation of the "Middle Way".[93]
Some earlier writers believed that Ashoka dramatically converted to Buddhism after seeing the suffering caused by the war since his Major Rock Edict 13 states that he became closer to the dhamma after the annexation of Kalinga.[91] However, even if Ashoka converted to Buddhism after the war, epigraphic evidence suggests that his conversion was a gradual process rather than a dramatic event.[91] For example, in a Minor Rock Edict issued during his 13th regnal year (five years after the Kalinga campaign), he states that he had been an upasaka (lay Buddhist) for more than two and a half years, but did not make much progress; in the past year, he was drawn closer to the sangha and became a more ardent follower.[91]"
On the contrary, Ashoka's conversion to Buddhism after Kalinga war is told in Ashoka's edicts, which I think is just too convenient. But then, Sri Lanka has had historical wars with Hindu kings from India, so that is there...
At the end, I should not have spoken so authoritative.