If your project contains test code, you likely don't want your developers to worry about issues detected in that code. You can create a module for the directories containing the test code and then edit the default view to exclude the module.
Create a module for the test code
- If you're not already viewing the Projects list, click Projects at the top left.
- Click your project in the list. The project details appear.
- Click Modules in the project details.
- Click Create a new module.
- In the Module name field, enter Test Code.
- If access control has been set up, you will see additional fields related to permissions; just leave the defaults, because you don't need to worry about who has access to test code.
- In the Path patterns field, enter the absolute path to your source files, or a path pattern.
Tip: You can use asterisks as wildcards (necessary if the path to your source files changes from build to build). A single asterisk matches one directory level; two asterisks match any part of a path. For example:
*/test/*
**/test/*
- Click add if you want to add more file paths to this module.
- Use the tags field to add information that will be helpful for filtering later.
- Click Create to save your new module.
For more details on creating modules, see Organizing your code into modules.
Edit the default view
- Go back to the Projects list by clicking Projects at the top left.
- Click the project you want to edit.
- The project details appear on the right. Click Views in the project details.
- Click the
edit icon to the left of the view labeled *default*.
- In the Search field, enter:
-
-module:"Test Code"
- Click Save.
Test the default view
- Click the New or Open issues link for the default view.
- You should not see issues found in code that's part of the Test Code module.