Merge pull request #123 from kemitix/package-scanner-impl-rename

Rename class DefaultPackageScanner as ClassGraphPackageScanner
This commit is contained in:
Paul Campbell 2018-10-05 07:57:34 +01:00 committed by GitHub
commit fc3155c27b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View file

@ -28,12 +28,14 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* Default implementation of {@link PackageScanner}. * Implementation of {@link PackageScanner} using ClassGraph.
*
* @see <a href="https://github.com/classgraph/classgraph/">ClassGraph</a>
* *
* @author Paul Campbell (pcampbell@kemitix.net). * @author Paul Campbell (pcampbell@kemitix.net).
*/ */
@Service @Service
public class DefaultPackageScanner implements PackageScanner { public class ClassGraphPackageScanner implements PackageScanner {
@Override @Override
public final List<String> apply(final RuleSource ruleSource) { public final List<String> apply(final RuleSource ruleSource) {

View file

@ -3,18 +3,17 @@ package net.kemitix.checkstyle.ruleset.builder;
import org.junit.Test; import org.junit.Test;
import java.util.List; import java.util.List;
import java.util.stream.Stream;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
/** /**
* Tests for {@link DefaultPackageScanner}. * Tests for {@link ClassGraphPackageScanner}.
* *
* @author Paul Campbell (pcampbell@kemitix.net) * @author Paul Campbell (pcampbell@kemitix.net)
*/ */
public class DefaultPackageScannerTest { public class ClassGraphPackageScannerTest {
private PackageScanner scanner = new DefaultPackageScanner(); private PackageScanner scanner = new ClassGraphPackageScanner();
@Test @Test
public void canScanCheckstylePackage() { public void canScanCheckstylePackage() {