To make the build process more configurable and stricter/less strict as needed by various projects, the cljs compiler should provide hooks that're invoked whenever a warning is emitted. Eventually these should be exposed through something like cljsbuild.
The attached patch changes the analyzer to emit warnings and emit dynamic warning handlers.
Note sure where the test for this could go though, it doesn't look like there's any infrastructure for the clj side.
Will take a look and add some clj tests to confirm the behavior.
Made sure all references to cljs-warnings were updated appropriately with the new warning types, added some basic tests, changed confirm-var-exists behavior to only call warning if a warning case has been triggered.
There are some bigger-than-expected changes in here, and it'd be nice to get some extra eyes on it to make sure warnings are triggered where expected. I tested a lot of it out in the repl and added some tests, but don't have enough code to exercise all of the paths.
Patch looks good to me and it appears to work as advertised