SonarQube Java
  1. SonarQube Java
  2. SONARJAVA-104

Improve the documentation explaining how to define some JaCoCo exclusion/inclusion patterns

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: JaCoCo
    • Labels:
      None
    • Number of attachments :
      0

      Description

      For instance nowhere, the character to be used to separate package names is explained, is it '.' or '/' ? It's in fact '/'.

      As we do in the Settings>Exclusions page, we should create a dedicated "Jacoco Wilcards" documentation section:

      Following rules are applied:
      *	Match zero or more characters
      ?	Match a single character
      /       Package names separator
      
      Examples:
      */castor/*  -> Match all java classes located in a 'castor' package
      Matches com/castor/MyClass, com/castor/bean/MyBean
      
      *dao*  -> Match all java classes having the 'dao' string in their logical path
      Matches com/myCompany/myDao/Something, com/myCompany/Mydao
      
      

        Issue Links

          Activity

          Hide
          Felix Köhler added a comment -

          For my OSGI related project i have to use following pattern to exclude test-classes from codecoverage.

          */Test:**/*Test.java

          Especially the the way you define classes which ends wit Test.
          It needed me some time to figuring out to add ".java". Because the documentation says class names.

          Show
          Felix Köhler added a comment - For my OSGI related project i have to use following pattern to exclude test-classes from codecoverage. * /Test :**/*Test.java Especially the the way you define classes which ends wit Test. It needed me some time to figuring out to add ".java". Because the documentation says class names.
          Hide
          Fabrice Bellingard added a comment -

          Checked.

          Show
          Fabrice Bellingard added a comment - Checked.

            People

            • Assignee:
              Evgeny Mandrikov
              Reporter:
              Freddy Mallet
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: