SonarQube
  1. SonarQube
  2. SONAR-2760

Ability to exclude source folders from source code analysis (the same way it's possible to exclude some packages for instance)

    Details

    • Number of attachments :
      0

      Description

      With the raise of Tycho (http://www.eclipse.org/tycho/) to build OSGI/Eclipse apps and since many eclipse based plugins have multiple source directory (such as
      xtext based plugins, to diferenciate manual (src directory) and generated (src-gen directory) code), it would be great to have the ability to exclude source directories rather than packages.

      Regards,

      Xavier

        Issue Links

          Activity

          Hide
          Simon Brandhof added a comment -

          Most of users will still use the standard inclusion/exclusion patterns. To prevent from misunderstanding of a new property, we're going to improve the format of existing exclusion properties. If they start with "file:", then the exclusions will relate to absolute path. A typical usage could be "file:*/src-gen//".

          Show
          Simon Brandhof added a comment - Most of users will still use the standard inclusion/exclusion patterns. To prevent from misunderstanding of a new property, we're going to improve the format of existing exclusion properties. If they start with "file:", then the exclusions will relate to absolute path. A typical usage could be "file:* /src-gen/ / ".
          Hide
          Simon Brandhof added a comment -

          @Michael Keppler, this plugin is a good candidate for the plugin forge !

          Show
          Simon Brandhof added a comment - @Michael Keppler, this plugin is a good candidate for the plugin forge !
          Hide
          Freddy Mallet added a comment -

          The exclusion of files based on absolut paths works well with "exclusion patterns" but not with "inclusion patterns".

          Moreover the following items must be added to the "Wilcards" documentation :

          • In "Following rules are applied":
            • file: to define a pattern based on the absolut path
          • In "Examples:":
            • org/mycompany/* matches all files in the org/mycompany directory. ex: org/mycompany/Foo.java, org/mycompany/Bar.cs
            • org/*Model matches all files with Model in filename and in the org directory. ex: org/Model.java, org/FirstModel.php, org/ModelTest.cs
            • org/*/.cs matches all .cs files underneath the org directory . ex : org/Foo.cs, org/foo/Bar.cs, org/foo/bar/Baz.cs
            • file:**/generated/** matches all files whose one parent directory is 'generated'. ex: /../my_project/tmp/generated/org/castor/Model.java
          Show
          Freddy Mallet added a comment - The exclusion of files based on absolut paths works well with "exclusion patterns" but not with "inclusion patterns". Moreover the following items must be added to the "Wilcards" documentation : In "Following rules are applied": file: to define a pattern based on the absolut path In "Examples:": org/mycompany/* matches all files in the org/mycompany directory. ex: org/mycompany/Foo.java, org/mycompany/Bar.cs org/*Model matches all files with Model in filename and in the org directory. ex: org/Model.java, org/FirstModel.php, org/ModelTest.cs org/* / .cs matches all .cs files underneath the org directory . ex : org/Foo.cs, org/foo/Bar.cs, org/foo/bar/Baz.cs file:**/generated/** matches all files whose one parent directory is 'generated'. ex: /../my_project/tmp/generated/org/castor/Model.java
          Hide
          Xavier Seignard added a comment -

          Thanks for correcting that!

          A shame I'm not developing Eclipse based stuff anymore

          Keep up the good work guys!

          Show
          Xavier Seignard added a comment - Thanks for correcting that! A shame I'm not developing Eclipse based stuff anymore Keep up the good work guys!
          Hide
          Daniel Warzecha added a comment -

          Thanks, I hope that will work...

          Show
          Daniel Warzecha added a comment - Thanks, I hope that will work...

            People

            • Assignee:
              Simon Brandhof
              Reporter:
              Xavier Seignard
            • Votes:
              14 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: