美文网首页
sonar过滤某个目录

sonar过滤某个目录

作者: Mlotjve | 来源:发表于2018-09-07 17:16 被阅读0次

    规则

    Paths are relative to the project base directory.

    The following wildcards can be used:

    image

    举例:

    # Exclude all classes ending by "Bean"
    # Matches org/sonar.api/MyBean.java, org/sonar/util/MyOtherBean.java, org/sonar/util/MyDTO.java, etc.
    sonar.exclusions=**/*Bean.java,**/*DTO.java
     
    # Exclude all classes in the "src/main/java/org/sonar" directory
    # Matches src/main/java/org/sonar/MyClass.java, src/main/java/org/sonar/MyOtherClass.java
    # But does not match src/main/java/org/sonar/util/MyClassUtil.java
    sonar.exclusions=src/main/java/org/sonar/*
     
    # Exclude all COBOL programs in the "bank" directory and its sub-directories
    # Matches bank/ZTR00021.cbl, bank/data/CBR00354.cbl, bank/data/REM012345.cob
    sonar.exclusions=bank/**/*
      
    # Exclude all COBOL programs in the "bank" directory and its sub-directories whose extension is .cbl
    # Matches bank/ZTR00021.cbl, bank/data/CBR00354.cbl
    sonar.exclusions=bank/**/*.cbl
    
    • 实例:


      image.png

    执行: sonar-scanner

    image.png

    相关文章

      网友评论

          本文标题:sonar过滤某个目录

          本文链接:https://www.haomeiwen.com/subject/ouncgftx.html