Class ScanForIssuesStep
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<org.jenkinsci.plugins.workflow.steps.Step>
-
- org.jenkinsci.plugins.workflow.steps.Step
-
- io.jenkins.plugins.analysis.core.steps.ScanForIssuesStep
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<org.jenkinsci.plugins.workflow.steps.Step>
public class ScanForIssuesStep extends org.jenkinsci.plugins.workflow.steps.Step
Scan files or the console log for issues.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ScanForIssuesStep.Descriptor
Descriptor for this step: defines the context and the UI elements.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ScanForIssuesStep()
Creates a new instance ofScanForIssuesStep
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
getBlameDisabled()
Returns whether SCM blaming should be disabled.List<RegexpFilter>
getFilters()
boolean
getForensicsDisabled()
Deprecated.Forensics will be automatically skipped if the Forensics recorder is not activated.String
getScm()
String
getSourceCodeEncoding()
String
getSourceDirectory()
Tool
getTool()
void
setBlameDisabled(boolean blameDisabled)
void
setFilters(List<RegexpFilter> filters)
void
setForensicsDisabled(boolean forensicsDisabled)
Deprecated.Forensics will be automatically skipped if the Forensics recorder is not activated.void
setScm(String scm)
Sets the SCM that should be used to find the reference build for.void
setSourceCodeEncoding(String sourceCodeEncoding)
Sets the encoding to use to read source files.void
setSourceDirectory(String sourceDirectory)
Sets the path to the folder that contains the source code.void
setTool(Tool tool)
Sets the static analysis tool that will scan files and create issues.org.jenkinsci.plugins.workflow.steps.StepExecution
start(org.jenkinsci.plugins.workflow.steps.StepContext context)
-
-
-
Constructor Detail
-
ScanForIssuesStep
@DataBoundConstructor public ScanForIssuesStep()
Creates a new instance ofScanForIssuesStep
.
-
-
Method Detail
-
getTool
@CheckForNull public Tool getTool()
-
setTool
@DataBoundSetter public void setTool(Tool tool)
Sets the static analysis tool that will scan files and create issues.- Parameters:
tool
- the static analysis tool
-
getFilters
public List<RegexpFilter> getFilters()
-
setFilters
@DataBoundSetter public void setFilters(List<RegexpFilter> filters)
-
setScm
@DataBoundSetter public void setScm(String scm)
Sets the SCM that should be used to find the reference build for. The reference recorder will select the SCM based on a substring comparison, there is no need to specify the full name.- Parameters:
scm
- the ID of the SCM to use (a substring of the full ID)
-
getScm
public String getScm()
-
getBlameDisabled
public boolean getBlameDisabled()
Returns whether SCM blaming should be disabled.- Returns:
true
if SCM blaming should be disabled
-
setBlameDisabled
@DataBoundSetter public void setBlameDisabled(boolean blameDisabled)
-
getForensicsDisabled
@Deprecated public boolean getForensicsDisabled()
Deprecated.Forensics will be automatically skipped if the Forensics recorder is not activated.Not used anymore.- Returns:
true
if SCM forensics should be disabled
-
setForensicsDisabled
@DataBoundSetter @Deprecated public void setForensicsDisabled(boolean forensicsDisabled)
Deprecated.Forensics will be automatically skipped if the Forensics recorder is not activated.Not used anymore.- Parameters:
forensicsDisabled
- not used
-
getSourceCodeEncoding
@CheckForNull public String getSourceCodeEncoding()
-
setSourceCodeEncoding
@DataBoundSetter public void setSourceCodeEncoding(String sourceCodeEncoding)
Sets the encoding to use to read source files.- Parameters:
sourceCodeEncoding
- the encoding, e.g. "ISO-8859-1"
-
getSourceDirectory
public String getSourceDirectory()
-
setSourceDirectory
@DataBoundSetter public void setSourceDirectory(String sourceDirectory)
Sets the path to the folder that contains the source code. If not relative and thus not part of the workspace then this folder needs to be added in Jenkins global configuration.- Parameters:
sourceDirectory
- a folder containing the source code
-
start
public org.jenkinsci.plugins.workflow.steps.StepExecution start(org.jenkinsci.plugins.workflow.steps.StepContext context)
- Specified by:
start
in classorg.jenkinsci.plugins.workflow.steps.Step
-
-