How to exclude certain folders or files from scanning in Eclipse?

We have a bunch of incorrect XML files used in unit tests to check if our application can process them.

Eclipse marks these XML files with errors, polluting the "problematic look."

Is there a way to exclude a specific folder from Eclipse validators?

+81
eclipse
Feb 16 2018-10-16
source share
5 answers

In the "Check" section of the "Settings" window, you can add different rules to the parameter columns (...), you can add the rule "Folder or file name" in the "Exclude group for XML" types.

+78
Feb 16 2018-10-16
source share

This is what I do to exclude the folder from scanning in the project. For me, this works for javascript and other warnings / errors.

  • Right click
  • Choose Resources, ResourceFilters
  • Click Add
  • Set the following Exclude all files and folders, All children, add an asterisk (*) in the input field for files and folders attributes (highlighted in the image below)

Note. In Eclipse Indigo you have to right-click on a folder and select properties, and then select a resource in the left navigation.

enter image description here

+45
Mar 21 2018-12-21T00:
source share
  • Go to window> Preferences> Check
  • Find the type of validation you want to disable, such as XML.
  • Right-click and select "Settings":

Eclipse Check

  1. In the Exclude Group group, click Add Rule, select Folder or File Name:

enter image description here

+7
Oct 28 '16 at 5:38 on
source share

Note. . I came here because I was looking for an easy way to exclude certain folders from scanning in Eclipse. My answer does not work for the specific case asked in the question (which is to hide invalid XML files from validation).

How to exclude certain folders or files from scanning in Eclipse?

When folders are on the build path, and when annoying problems are just warnings, there is a way that is straightforward:

  • Right click
  • Properties
  • Java compiler
  • Check Ignore optional compile problems
  • Ok

The folders will still be checked, errors will be reported, but all warnings will be ignored by Eclipse. For example, this is ideal for a folder of generated sources.

+1
Jul 23 '15 at 11:20
source share

You can also set the output / overview side. So, go to the Show-Menu of Problem-View and filter the display for only the selected items. enter image description here

0
Sep 22 '17 at 13:56 on
source share



All Articles