Hide Google Library's warnings

Lou*_*uis 5 google-closure-library google-closure-compiler

I'm using Google Closure and Google Library with my projects and I'm meeting troubles with warnings.

My project is made of ~50 files with somme small warnings (JSDoc mistakes). The problem is Google Library, when I'm compiling my project, a huge list of warnings come from the google's library, like this :

../Libs/Closure/closure/goog/uri/utils.js:255: WARNING - inconsistent return type
found   : (null|string|undefined)
required: (null|string)
  return uri && decodeURIComponent(uri);
         ^

../Libs/Closure/closure/goog/uri/utils.js:634: WARNING - inconsistent return type
found   : (Array.<(string|undefined)>|undefined)
required: Array.<(string|undefined)>
  return buffer;
         ^

../Libs/Closure/closure/goog/uri/utils.js:671: WARNING - inconsistent return type
found   : (Array.<(string|undefined)>|undefined)
required: Array.<(string|undefined)>
  return buffer;
         ^

../Libs/Closure/third_party/closure/goog/mochikit/async/deferred.js:623: WARNING - assignment to property deferred of goog.async.Deferred.AlreadyCalledError
found   : (goog.async.Deferred|undefined)
required: (goog.async.Deferred|null)
  this.deferred = deferred;
  ^

../Libs/Closure/third_party/closure/goog/mochikit/async/deferred.js:651: WARNING - assignment to property deferred of goog.async.Deferred.CancelledError
found   : (goog.async.Deferred|undefined)
required: (goog.async.Deferred|null)
  this.deferred = deferred;
  ^
Run Code Online (Sandbox Code Playgroud)

I've got more than 300 warnings from Google Library and ~50 from my project. So, how can I hide google's library warnings and show my project warnings ?

I've tried to build my project with the stable Google Library and with the last from the SVN repository but I've always all this warning.

我的编译配置:

../Libs/Closure/closure/bin/build/closurebuilder.py \
--root=../Libs/Closure/ \
--root=../Projects/myProject/ \
--namespace="Project" \
--output_mode=compiled \
--compiler_jar=../Libs/Closure/compiler.jar \
--compiler_flags="--third_party=../Libs/Raphael/raphaeljs_extern.js" \
--compiler_flags="--compilation_level=SIMPLE_OPTIMIZATIONS" \
--compiler_flags="--warning_level=VERBOSE" \
> ../../Projects/js/project_release.js
Run Code Online (Sandbox Code Playgroud)

谢谢你的时间!

hef*_*eff 0

您可以在文件概述中使用@suppress 标记。 http://code.google.com/p/closure-compiler/wiki/Warnings#@suppress_Tags