-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce VS renderer provided by CPD (#47)
what it is required for ;-)
- Loading branch information
Showing
9 changed files
with
128 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/de/aaschmid/gradle/plugins/cpd/CpdVsFileReport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package de.aaschmid.gradle.plugins.cpd; | ||
|
||
import org.gradle.api.reporting.SingleFileReport; | ||
import org.gradle.api.tasks.Input; | ||
import org.gradle.api.tasks.Optional; | ||
|
||
/** | ||
* The single file simple text report for code/paste (= duplication) detection. | ||
* | ||
* @see CpdPlugin | ||
*/ | ||
public interface CpdVsFileReport extends SingleFileReport { | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/de/aaschmid/gradle/plugins/cpd/internal/CpdVsFileReportImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package de.aaschmid.gradle.plugins.cpd.internal; | ||
|
||
import de.aaschmid.gradle.plugins.cpd.CpdVsFileReport; | ||
import org.gradle.api.Task; | ||
import org.gradle.api.reporting.internal.TaskGeneratedSingleFileReport; | ||
|
||
public class CpdVsFileReportImpl extends TaskGeneratedSingleFileReport implements CpdVsFileReport { | ||
|
||
public CpdVsFileReportImpl(String name, Task task) { | ||
super(name, task); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/test/java/de/aaschmid/gradle/plugins/cpd/internal/CpdVsFileReportImplTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package de.aaschmid.gradle.plugins.cpd.internal; | ||
|
||
import de.aaschmid.gradle.plugins.cpd.Cpd; | ||
import de.aaschmid.gradle.plugins.cpd.test.GradleExtension; | ||
import org.gradle.api.tasks.TaskProvider; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
@ExtendWith(GradleExtension.class) | ||
class CpdVsFileReportImplTest { | ||
|
||
@Test | ||
void CpdVsFileReportImpl_shouldHaveNullAsDefaultEncoding(TaskProvider<Cpd> cpdCheck) { | ||
// When: | ||
CpdVsFileReportImpl result = new CpdVsFileReportImpl("vs", cpdCheck.get()); | ||
|
||
// Then: | ||
assertThat(result).isNotNull(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters