Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Nov 21, 2024
1 parent 09d871a commit 9c23bfb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
import org.codehaus.plexus.resource.ResourceManager;
import org.codehaus.plexus.resource.loader.FileResourceLoader;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.PathTool;

/**
* Base abstract class for Checkstyle reports.
Expand Down Expand Up @@ -461,11 +460,13 @@ public abstract class AbstractCheckstyleReport extends AbstractMavenReport {
protected ByteArrayOutputStream stringOutputStream;

/** {@inheritDoc} */
@Override
public String getName(Locale locale) {
return getI18nString(locale, "name");
}

/** {@inheritDoc} */
@Override
public String getDescription(Locale locale) {
return getI18nString(locale, "description");
}
Expand All @@ -479,6 +480,7 @@ protected String getI18nString(Locale locale, String key) {
return i18n.getString("checkstyle-report", locale, "report.checkstyle." + key);
}

@Override
protected MavenProject getProject() {
return project;
}
Expand All @@ -488,6 +490,7 @@ protected List<MavenProject> getReactorProjects() {
}

/** {@inheritDoc} */
@Override
public void executeReport(Locale locale) throws MavenReportException {
checkDeprecatedParameterUsage(sourceDirectory, "sourceDirectory", "sourceDirectories");
checkDeprecatedParameterUsage(testSourceDirectory, "testSourceDirectory", "testSourceDirectories");
Expand Down Expand Up @@ -675,16 +678,6 @@ protected AuditListener getConsoleListener() throws MavenReportException {
return consoleListener;
}

private String determineRelativePath(File location) {
String relativePath =
PathTool.getRelativePath(getReportOutputDirectory().getAbsolutePath(), location.getAbsolutePath());
if (relativePath == null || relativePath.trim().isEmpty()) {
relativePath = ".";
}

return relativePath + "/" + location.getName();
}

protected List<File> getSourceDirectories() {
if (sourceDirectories == null) {
sourceDirectories = filterBuildTarget(project.getCompileSourceRoots());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,10 @@ public class CheckstyleViolationCheckMojo extends AbstractMojo {
@Parameter(property = "checkstyle.excludeGeneratedSources", defaultValue = "false")
private boolean excludeGeneratedSources;

private AuditListener auditListener;

private File outputXmlFile;

/** {@inheritDoc} */
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
checkDeprecatedParameterUsage(sourceDirectory, "sourceDirectory", "sourceDirectories");
checkDeprecatedParameterUsage(testSourceDirectory, "testSourceDirectory", "testSourceDirectories");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ private void generateReport(String pluginXml) throws Exception {
assertTrue("Test cache file exists", new File(cacheFile).exists());
}

File outputDir = mojo.getReportOutputDirectory();

File useFile = (File) getVariableValueFromObject(mojo, "useFile");
if (useFile != null) {
assertTrue("Test useFile exists", useFile.exists());
Expand Down

0 comments on commit 9c23bfb

Please sign in to comment.