I am not sure I see any issues with the dueling being a violation of the codes.
The codes say that people should avoid needless duels. Those duels for rankings, etc, are needless, obviously as they are solely for personal glory, with the attendant risk of serious injury.
But, Dalinar has a strategic objective in the war at this point...to consolidate all the Shards in trusted hands, thereby allowing him to run the war. He has charged Adolin with winning those Shards through dueling. As even Adolin says, if he loses the duel, it puts a huge crimp int he plans for executing the war. This is hardly needless dueling. In fact, it's one of the cornerstones of the entire strategy.
Now, you can argue that the strategy is dishonest and violates the codes as a result. I could be convinced on that. But, given his strategy to win the war, the dueling is an integral part and, as such, is far from "needless" as the codes forbid.