Skip to content

Commit

Permalink
[docs] Cleanup rest of javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
hazendaz committed Aug 26, 2024
1 parent 2fa0692 commit c96bb06
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 196 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ import org.codehaus.plexus.resource.ResourceManager

abstract class BaseViolationCheckMojo extends AbstractMojo {

/**
* Location where generated html will be created.
*/
/** Location where generated html will be created. */
@Parameter(defaultValue = '${project.reporting.outputDirectory}', required = true)
File outputDirectory

Expand Down Expand Up @@ -82,39 +80,27 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {
@Parameter(property = "spotbugs.outputXmlFilename", defaultValue = "spotbugsXml.xml")
String spotbugsXmlOutputFilename

/**
* Doxia Site Renderer.
*/
/** Doxia Site Renderer. */
@Component(role = Renderer.class)
Renderer siteRenderer

/**
* Directory containing the class files for Spotbugs to analyze.
*/
/** Directory containing the class files for Spotbugs to analyze. */
@Parameter(defaultValue = '${project.build.outputDirectory}', required = true)
File classFilesDirectory

/**
* Directory containing the test class files for Spotbugs to analyze.
*/
/** Directory containing the test class files for Spotbugs to analyze. */
@Parameter(defaultValue = '${project.build.testOutputDirectory}', required = true)
File testClassFilesDirectory

/**
* Location of the Xrefs to link to.
*/
/** Location of the Xrefs to link to. */
@Parameter(defaultValue = '${project.reporting.outputDirectory}/xref')
File xrefLocation

/**
* Location of the Test Xrefs to link to.
*/
/** Location of the Test Xrefs to link to. */
@Parameter(defaultValue = '${project.reporting.outputDirectory}/xref-test')
File xrefTestLocation

/**
* The directories containing the sources to be compiled.
*/
/** The directories containing the sources to be compiled. */
@Parameter(defaultValue = '${project.compileSourceRoots}', required = true, readonly = true)
List compileSourceRoots

Expand All @@ -134,9 +120,7 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {
@Parameter(defaultValue = "false", property = "spotbugs.includeTests")
boolean includeTests

/**
* List of artifacts this plugin depends on. Used for resolving the Spotbugs core plugin.
*/
/** List of artifacts this plugin depends on. Used for resolving the Spotbugs core plugin. */
@Parameter(property = "plugin.artifacts", required = true, readonly = true)
List pluginArtifacts

Expand All @@ -146,27 +130,19 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {
@Parameter(property = "localRepository", required = true, readonly = true)
ArtifactRepository localRepository

/**
* Remote repositories which will be searched for the coreplugin jar.
*/
/** Remote repositories which will be searched for the coreplugin jar. */
@Parameter(property = "project.remoteArtifactRepositories", required = true, readonly = true)
List remoteArtifactRepositories

/**
* Maven Session.
*/
/** Maven Session. */
@Parameter (defaultValue = '${session}', required = true, readonly = true)
MavenSession session

/**
* Maven Project.
*/
/** Maven Project. */
@Parameter(property = "project", required = true, readonly = true)
MavenProject project

/**
* Encoding used for xml files. Default value is UTF-8.
*/
/** Encoding used for xml files. Default value is UTF-8. */
@Parameter(defaultValue = "UTF-8", readonly = true)
String xmlEncoding

Expand All @@ -188,24 +164,18 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {
@Parameter(defaultValue = '${project.reporting.outputEncoding}', property = "outputEncoding")
String outputEncoding

/**
* Threshold of minimum bug severity to report. Valid values are High, Default, Low, Ignore, and Exp (for experimental).
*/
/** Threshold of minimum bug severity to report. Valid values are High, Default, Low, Ignore, and Exp (for experimental). */
@Parameter(defaultValue = "Default", property = "spotbugs.threshold")
String threshold

/**
* Artifact resolver, needed to download the coreplugin jar.
*/
/** Artifact resolver, needed to download the coreplugin jar. */
@Component(role = ArtifactResolver.class)
ArtifactResolver artifactResolver

/**
* File name of the include filter. Only bugs in matching the filters are reported.
*
* <p>
* Potential values are a filesystem path, a URL, or a classpath resource.
*
* <p>
* This parameter is resolved as resource, URL, then file. If successfully
* resolved, the contents of the configuration is copied into the
Expand All @@ -220,10 +190,8 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {

/**
* File name of the exclude filter. Bugs matching the filters are not reported.
*
* <p>
* Potential values are a filesystem path, a URL, or a classpath resource.
*
* <p>
* This parameter is resolved as resource, URL, then file. If successfully
* resolved, the contents of the configuration is copied into the
Expand All @@ -238,10 +206,8 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {

/**
* File names of the baseline files. Bugs found in the baseline files won't be reported.
*
* <p>
* Potential values are a filesystem path, a URL, or a classpath resource.
*
* <p>
* This parameter is resolved as resource, URL, then file. If successfully
* resolved, the contents of the configuration is copied into the
Expand All @@ -263,9 +229,7 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {
@Parameter(defaultValue = "Default", property = "spotbugs.effort")
String effort

/**
* Turn on Spotbugs debugging.
*/
/** Turn on Spotbugs debugging. */
@Parameter(defaultValue = "false", property = "spotbugs.debug")
boolean debug

Expand Down Expand Up @@ -296,10 +260,8 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {

/**
* The plugin list to include in the report. This is a comma-delimited list.
*
* <p>
* Potential values are a filesystem path, a URL, or a classpath resource.
*
* <p>
* This parameter is resolved as resource, URL, then file. If successfully
* resolved, the contents of the configuration is copied into the
Expand Down Expand Up @@ -430,9 +392,7 @@ abstract class BaseViolationCheckMojo extends AbstractMojo {
@Parameter(property = "spotbugs.maxAllowedViolations", defaultValue = "0")
int maxAllowedViolations

/**
* Disable bugs log.
*/
/** Disable bugs log. */
@Parameter(defaultValue = "false", property = "spotbugs.quiet")
boolean quiet

Expand Down
11 changes: 10 additions & 1 deletion src/main/groovy/org/codehaus/mojo/spotbugs/PluginArtifact.groovy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,18 @@
package org.codehaus.mojo.spotbugs

class PluginArtifact {
/** The group id. */
String groupId

/** The artifact id. */
String artifactId

/** The version. */
String version

/** The type defaulted as jar. */
String type = "jar"

/** The classifier. */
String classifier
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,8 +23,13 @@ import org.codehaus.plexus.resource.ResourceManager

final class ResourceHelper {

/** The log. */
Log log

/** The output directory. */
File outputDirectory

/** The resource manager. */
ResourceManager resourceManager

ResourceHelper(Log log, File outputDirectory, ResourceManager resourceManager) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2023 the original author or authors.
* Copyright 2005-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,9 +27,7 @@ import java.nio.file.Paths
*/
class SourceFileIndexer {

/**
* List of source files found in the current Maven project
*/
/** List of source files found in the current Maven project. */
private List<String> allSourceFiles

/**
Expand Down Expand Up @@ -113,6 +111,7 @@ class SourceFileIndexer {

/**
* Normalize path to use forward slash.
* <p>
* This will facilitate searches.
*
* @param path Path to clean up
Expand Down
59 changes: 13 additions & 46 deletions src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsGui.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -47,40 +47,26 @@ import org.codehaus.plexus.resource.ResourceManager
@Mojo(name = "gui", requiresDependencyResolution = ResolutionScope.TEST, requiresProject = true)
class SpotBugsGui extends AbstractMojo implements SpotBugsPluginsTrait {

/**
* locale to use for Resource bundle.
*/
/** Locale to use for Resource bundle. */
static Locale locale = Locale.ENGLISH

/**
* Directory containing the class files for Spotbugs to analyze.
*/
/** Directory containing the class files for Spotbugs to analyze. */
@Parameter(defaultValue = '${project.build.outputDirectory}', required = true)
File classFilesDirectory

/**
* Turn on Spotbugs debugging.
*
*/
/** Turn on Spotbugs debugging. */
@Parameter(defaultValue = "false", property="spotbugs.debug")
boolean debug

/**
* List of artifacts this plugin depends on. Used for resolving the Spotbugs core plugin.
*/
/** List of artifacts this plugin depends on. Used for resolving the Spotbugs core plugin. */
@Parameter(property="plugin.artifacts", required = true, readonly = true)
List pluginArtifacts

/**
* Effort of the bug finders. Valid values are Min, Default and Max.
*
*/
/** Effort of the bug finders. Valid values are Min, Default and Max. */
@Parameter(defaultValue = "Default", property="spotbugs.effort")
String effort

/**
* The plugin list to include in the report. This is a SpotbugsInfo.COMMA-delimited list.
*/
/** The plugin list to include in the report. This is a SpotbugsInfo.COMMA-delimited list. */
@Parameter(property="spotbugs.pluginList")
String pluginList

Expand All @@ -94,23 +80,15 @@ class SpotBugsGui extends AbstractMojo implements SpotBugsPluginsTrait {
@Parameter
PluginArtifact[] plugins

/**
* Artifact resolver, needed to download the coreplugin jar.
*/
/** Artifact resolver, needed to download the coreplugin jar. */
@Component(role = ArtifactResolver.class)
ArtifactResolver artifactResolver

/**
* Used to look up Artifacts in the remote repository.
*
*/
/** Used to look up Artifacts in the remote repository. */
@Component(role = RepositorySystem.class)
RepositorySystem factory

/**
* List of Remote Repositories used by the resolver.
*
*/
/** List of Remote Repositories used by the resolver. */
@Parameter(property = "project.remoteArtifactRepositories", required = true, readonly = true)
List remoteRepositories

Expand All @@ -121,30 +99,19 @@ class SpotBugsGui extends AbstractMojo implements SpotBugsPluginsTrait {
@Parameter(property = "localRepository", required = true, readonly = true)
ArtifactRepository localRepository

/**
* Maven Session.
*/
/** Maven Session. */
@Parameter (defaultValue = '${session}', required = true, readonly = true)
MavenSession session

/**
* Maven Project.
*
*/
/** Maven Project. */
@Parameter(property="project", required = true, readonly = true)
MavenProject project

/**
* Resource bundle for a specific locale.
*
*/
/** Resource bundle for a specific locale. */
@Parameter(readonly = true)
ResourceBundle bundle

/**
* Specifies the directory where the Spotbugs native xml output will be generated.
*
*/
/** Specifies the directory where the Spotbugs native xml output will be generated. */
@Parameter(defaultValue = '${project.build.directory}', required = true)
File spotbugsXmlOutputDirectory

Expand Down
Loading

0 comments on commit c96bb06

Please sign in to comment.