簡體   English   中英

按軟件包忽略所有棉絨警告錯誤

[英]Ignore all lint warnings errors by package

我想忽略整個com軟件包中的所有棉絨警告和錯誤。

皮棉文檔中,我只能看到如何使用pathregexp忽略特定文件和目錄的某些問題。

如何忽略com程序包中的每個問題?

所以試試這個:

   <lint>
       <issue id="InvalidPackage">
          <ignore regexp="com.*" />
      </issue>
   </lint>

您可以使用id="all"忽略所有棉絨警告,以下示例來自棉絨報告本身:

<!-- Ignore everything in the test source set -->
<issue id="all">
    <ignore path="*/test/*" />
</issue>

因此,在您的情況下,它非常接近@MrZ的響應:

    <issue id="all">
        <ignore regexp="com.*" />
    </issue>

嘗試使用以下

-keep class com.example.** {
    public protected private *;
 }
-dontwarn com.example.**

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM