public boolean accept(DefaultIssue issue, Component component) {
    if (component.getType() != FILE || (exclusionPatterns.isEmpty() && inclusionPatterns.isEmpty())) {
      return true;
    }
    if (isExclude(issue, component)) {
      return false;
    }
    return isInclude(issue, component);
  }
@Test
  public void ignore_some_rule_and_component() {
    IssueFilter underTest = newIssueFilter(newSettings(asList("xoo:x1", "**/xoo/File1*"), Collections.emptyList()));

    assertThat(underTest.accept(ISSUE_1, COMPONENT_1)).isFalse();
    assertThat(underTest.accept(ISSUE_1, COMPONENT_2)).isTrue();
    assertThat(underTest.accept(ISSUE_2, COMPONENT_1)).isTrue();
    assertThat(underTest.accept(ISSUE_2, COMPONENT_2)).isTrue();
  }