Not sure I would agree its against code, but if you have the building code please show. Roofs are supported for vertical loads not horizontal to my understanding. Wind loads are transferred in the roof structure.
The columns just need to be secured enough to keep them from being moved if...