简体   繁体   English

closure-compiler不会关闭可疑代码警告

[英]closure-compiler wouldn't switch off suspicious code warning

I use the closure compiler to compile different js files into one short file. 我使用闭包编译器将不同的js文件编译为一个短文件。 Admittedly this is not very effective for an already compiled file but never the less it should work. 诚然,这对于已经编译的文件不是很有效,但是它永远都不会起作用。 I got the command line options from the wiki page but it still shows me the warnings. 我从维基页面获得了命令行选项,但它仍然显示警告。 Anyone got any idea what I might probably have done wrong? 任何人都知道我可能做错了什么?

java -jar googleClosureCompiler.jar --jscomp_off=suspiciousCode --js "bootstrap.min.js"

So I finally found out that the warning "Suspicious Code" could be silenced with the option 因此,我最终发现,该选项可以使警告“可疑代码”消失

--jscomp_off=uselessCode

Dam well played google! 大坝玩得好谷歌!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Java内部使用“ closure-compiler” - how to use “closure-compiler ” inside the java 为什么这个Java代码有效?编译器不抱怨关闭 - Why is this Java code working? compiler doesn't complain about closure 为什么代码不能在 for 循环中工作? - Why wouldn't the code work in the for loop? 我应该关闭哪些编译器警告? - What compiler warnings should I switch off? 为什么这段代码不能在 Java 中运行? 错误:<identifier> 预期的 - Why wouldn't this code run in Java? Eror : <identifier> expected 为什么下面的代码除非数组为Integer []而不是int []否则将无法工作 - why the code below wouldn't work unless the array is Integer[], not int[] 编译器自动机,如何制作此图,使线条不相交? - compiler automata , how do I make this diagram so the lines wouldn't intersect? 为什么Javac编译器不使用有关argargs模糊性的警告来标记此代码? - Why doesn't the javac compiler flag this code with a warning about varargs ambiguity? “<T extends ...>”返回类型的意外编译器警告 - Unexpected compiler warning for “<T extends …>” return type 为什么eclipse不会将编译器切换到Java 8? - Why won't eclipse switch the compiler to Java 8?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM