Is there a way to validate GLSL syntax build-time instead of run-time? My application takes a long time to start and I want to know at the earliest possible stage that my shaders are ok. I'm using Visual Studio/Xcode. The solution probably involves running a tool as a part of build process, but I'm looking for such a tool.
NVIDIA's Cg Toolkit should be able to compile (or translate) shaders offline and spit errors. Another option is to create a tiny executable yourself that takes in a shader file and tries to compile it with your GPU driver's compiler (or perhaps such a compiler is already provided for you by the vendor). Though I think at least in the latter cases many compilers are too forgiving to catch all errors.
Related question: Multiplatform GLSL shader validator?
This is a pretty late reply, but some new options have shown up recently to address this.
Khronos released a reference compiler called glslangValidator that can perform syntax validation (and more) on GLSL shader files. If there are any issues with your shader, it will print them out with line number information.
You can set up a custom pre build step or the like in Visual Studio or XCode to run this tool on your shader files.
I also wrote a Property Sheet for Visual Studio that makes use of glslangValidator to do build time validation of shader files. You can find it here.