SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-698

Allow to exclude sources from code analysis based on cutoff date

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: CUTOFF-0.1
    • Component/s: Cutoff Date
    • Labels:
      None
    • Number of attachments :
      0

      Description

      On per project basis, add a new exclusion filter to specify the exclusion/cutoff date. Any source file that was last modified prior to that date will be excluded from code analysis.

      This can be very useful when you want to analyze the work done on an existing code base and measure the quality of new code/changes only. This way previous phases of the project will not impact the analysis.

        Issue Links

          Activity

          Hide
          Simon Brandhof added a comment -

          This feature is implemented as a plugin. It defines two exclusive properties :

          • sonar.cutoff.date: analyze only source files updated after this date.
          • sonar.cutoff.periodInDays: analyze only source files updated during the last days.

          These properties don't have default values, so the plugin is deactivated by default (accept all source files).

          Show
          Simon Brandhof added a comment - This feature is implemented as a plugin. It defines two exclusive properties : sonar.cutoff.date: analyze only source files updated after this date. sonar.cutoff.periodInDays: analyze only source files updated during the last days. These properties don't have default values, so the plugin is deactivated by default (accept all source files).
          Hide
          Simon Brandhof added a comment -

          FYI the new property sonar.skipTendencies (see SONAR-1822) can be useful when sonar.cutoff.periodInDays is set. It avoids displaying meaningless icons of measure tendency.

          Show
          Simon Brandhof added a comment - FYI the new property sonar.skipTendencies (see SONAR-1822 ) can be useful when sonar.cutoff.periodInDays is set. It avoids displaying meaningless icons of measure tendency.
          Hide
          Leonid Geller added a comment -

          Simon:

          What is the intended format for sonar.cutoff.date value?

          Why you do think measure tendencies become meaningless with the use of periodInDays property?

          Show
          Leonid Geller added a comment - Simon: What is the intended format for sonar.cutoff.date value? Why you do think measure tendencies become meaningless with the use of periodInDays property?
          Hide
          Simon Brandhof added a comment -

          The date format is yyyy-MM-dd.

          About tendency icons and time machine, I think it can be confusing because the set of analyzed files evolve over time. For example the files analyzed in the last 10 days are probably not the same at all than the files updated btween 20 and 10 days ago.

          Show
          Simon Brandhof added a comment - The date format is yyyy-MM-dd. About tendency icons and time machine, I think it can be confusing because the set of analyzed files evolve over time. For example the files analyzed in the last 10 days are probably not the same at all than the files updated btween 20 and 10 days ago.

            People

            • Assignee:
              Simon Brandhof
              Reporter:
              Leonid Geller
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: