jlgrock / ClosureJavascriptFramework

A group of plug-ins that can be used in conjunction with maven to execute the Google Closure Compiler on JavaScript code. This Framework allows for scaling and modularity.
MIT License
16 stars 7 forks source link

Configurable warning levels #53

Open lukas-vlcek opened 10 years ago

lukas-vlcek commented 10 years ago

Is there any way how to configure fain grained levels of warnings? See https://github.com/google/closure-compiler/wiki/Warnings

For example I have run into issue where in the source code of closure-library are mismatched JSDocs parameter types in one file and by default the STRICT errorLevel results into terminated compilation due to this. Is there any way how to say: "OK, just try to use options.setWarningLevel(DiagnosticGroups.CHECK_TYPES, CheckLevel.WARNING) but keep the rest of the levels unchanged"?

jlgrock commented 10 years ago

Yeah, I have been unable to find a way to do that without hard coding every variable as a parameter. That seemed a little obscene. I instead made groups of them. You have any ideas?

BTW - this isn't one that I would avoid checking just because it breaks your stuff anyways. You can typecaste to get around this particular issue. Turning it off because one of them breaks seems dangerous. Also... I think there's a way to skip an error in a method, but I'd have to look that up too. I may be confusing that with spock or something.