I doubt you have a code violation, it would have to exceed 75% fill (darn near imposable to do) at the splices to be a violation.

Quote
312.8 Enclosures for Switches or Overcurrent Devices.
Enclosures for switches or overcurrent devices shall not be used as junction boxes, auxiliary gutters, or raceways for conductors feeding through or tapping off to other switches or overcurrent devices, unless adequate space for this purpose is provided. The conductors shall not fill the wiring space at any cross section to more than 40 percent of the cross-sectional area of the space, and the conductors, splices, and taps shall not fill the wiring space at any cross section to more than 75 percent of the cross-sectional area of that space.


Bob Badger
Construction & Maintenance Electrician
Massachusetts