A comment on an answer to this question seems to be saying that its illegal for an unswitched hot to run through a light fixture junction box, even though its not connected to the fixture at that point. (The light fixture would be receiving switched hot on a taped-white return from a switch).
Is this true and if so, could anyone give a pointer to where I should look in the NEC for that? I'm planning a little electrical work in the near future and I'm not aware of this restriction.
I am aware of the 2011 NEC rule which specifies that neutral must now be available at the switch to allow for new electronic lighting controls, which I imagine in many cases could result in the installation being wired differently such that the unswitched hot and neutral run to the switch directly rather than via the fixture.
But I can't see why in an older installation that it would be illegal or dangerous for unswitched hot to be routed via the fixture junction box.