1
2
3
4
5 package com.qulice.maven;
6
7 import com.qulice.spi.ResourceValidator;
8 import com.qulice.spi.Violation;
9 import java.io.File;
10 import java.util.Collection;
11 import java.util.Collections;
12 import java.util.concurrent.atomic.AtomicInteger;
13
14
15
16
17
18
19
20
21 final class FakeResourceValidator implements ResourceValidator {
22
23
24
25
26 private final String label;
27
28
29
30
31 private final AtomicInteger cnt;
32
33 FakeResourceValidator(final String name) {
34 this.label = name;
35 this.cnt = new AtomicInteger(0);
36 }
37
38 @Override
39 public Collection<Violation> validate(final Collection<File> files) {
40 this.cnt.incrementAndGet();
41 return Collections.emptyList();
42 }
43
44 @Override
45 public String name() {
46 return this.label;
47 }
48
49 int count() {
50 return this.cnt.get();
51 }
52 }