私は自分のプロジェクトで Google Closure と Google Library を使用していますが、警告でトラブルに遭遇しています。
私のプロジェクトは、いくつかの小さな警告 (JSDoc の間違い) がある ~50 個のファイルで構成されています。問題は Google ライブラリです。プロジェクトをコンパイルしているときに、Google のライブラリから次のような警告の膨大なリストが表示されます。
../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;
^
Google ライブラリから 300 件以上、プロジェクトから 50 件以上の警告を受けています。では、Google のライブラリの警告を非表示にしてプロジェクトの警告を表示するにはどうすればよいですか?
安定したGoogleライブラリとSVNリポジトリの最後のプロジェクトを使用してプロジェクトをビルドしようとしましたが、常にこの警告がすべて表示されます。
私のコンパイル構成:
../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
御時間ありがとうございます!