I've done it both ways and there are a lot of things that come into play as far as what is best for gaining muscle...dirty diet bulking and gaining while staying lean... diet, macros, drugs, doses, training style...
I will personally never bulk up and gain a lot of fat to gain muscle as it takes so much effort dieting the extra shit weight off to see what you really look like. I think that staying between 8 and 10% bodyfat is ideal for me off season...It's much easier to do coming off of a competition and just not letting things get too out of control but 8-10% is leaner than most people realize and trying to gain while getting down in bodyfat is a lot harder to do than already being lean and gaining muscle without adding much fat... ideally I'd suggest figuring out what your true metabolic rate is and where you just maintain your weight at and then adding another 600 calories or so... If your gaining too much bodyfat doing that then just make the adjustment and cut 300 cals or so and see where that gets you... The key to continuing to progress is making adjustments in your protien and essential fatty acid intake as you ad new muscle to accommodate the new tissues requirements to continue growing. Carbs are really just your fuel source and should only be adjusted by your energy expendature... for example, you obviously need more calories from carbs on your leg days than you would on a delt day and you need even less on off days... Some old school guys will argue that and say you need carbs for this, that, and a bunch of other reasons but if you want to stay lean while growing you really want to take into account you daily energy expendature and where you can keep your glycogen levels fuller at without getting excessive spillover... Carbs aren't really needed for growth of new tissue technically , but they do provide a better environment in the muscle cell for growth when glycogen levels are full as the carry water and fluid into the cell allowing protein to do its job and grow new tissue optimally.