HoriSun / closure-compiler

Automatically exported from code.google.com/p/closure-compiler
0 stars 0 forks source link

Feature request: fine-grained warning/error upgrade control #1256

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Branched from discussion in 
https://code.google.com/p/closure-compiler/issues/detail?id=1253

In the interest of well-typed JS, there is interest in upgrading warnings from 
reportUnknownTypes to errors.

Requested is finer-grained controls on what warnings become errors.  AFAIK, 
"upgrade all warnings to errors" is a thing, whereas some teams might want some 
subset. This is similar to configurability in GCC and elsewhere.

http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

"well typed" JS assurance is a related, but possibly separate topic.

Original issue reported on code.google.com by nn...@google.com on 26 Feb 2014 at 1:34

GoogleCodeExporter commented 9 years ago
Afaict there's already an api for this. Can you be more specific about how the 
current api doesn't meet your needs?

Original comment by Nicholas.J.Santos on 26 Feb 2014 at 7:14

GoogleCodeExporter commented 9 years ago
https://code.google.com/p/closure-compiler/wiki/Warnings 

Original comment by Nicholas.J.Santos on 26 Feb 2014 at 7:16

GoogleCodeExporter commented 9 years ago
You're right, I just haven't played with these flags for a long while.  These 
are specifiable.
 --jscomp_error=<type>   
 --jscomp_warning=<type>

etc

Original comment by nn...@google.com on 26 Feb 2014 at 7:18

GoogleCodeExporter commented 9 years ago
Primarily we'd like to get to a point of entirely well typed code guarantees. 
It's not clear that reportUnknownTypes will get us all the way there. John and 
Mark are preparing a doc on the topic. 

Original comment by nn...@google.com on 26 Feb 2014 at 7:24