-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sladyn
committed
Jun 12, 2019
1 parent
e50f6b7
commit 4e47bd4
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.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,49 @@ | ||
package io.jenkins.plugins.analysis.warnings; | ||
|
||
import edu.hm.hafner.analysis.IssueParser; | ||
import edu.hm.hafner.analysis.parser.JavacParser; | ||
import edu.umd.cs.findbugs.annotations.NonNull; | ||
import hudson.Extension; | ||
import io.jenkins.plugins.analysis.core.model.ReportScanningTool; | ||
import org.jenkinsci.Symbol; | ||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
/** | ||
* Provides a parser and customized messages for PEP8 Python style guide. | ||
* | ||
* @author Sladyn Nunes | ||
*/ | ||
|
||
public class Kotlin extends ReportScanningTool { | ||
|
||
private static final long serialVersionUID = 00; // To be added | ||
private static final String ID = "kotlin"; | ||
|
||
/** Creates a new instance of {@link Kotlin}. */ | ||
@DataBoundConstructor | ||
public Kotlin() { | ||
super(); | ||
// empty constructor required for stapler | ||
} | ||
|
||
@Override | ||
public IssueParser createParser() { | ||
return new JavacParser(); | ||
} | ||
|
||
/** Descriptor for this static analysis tool. */ | ||
@Symbol("kotlin") | ||
@Extension | ||
public static class Descriptor extends ReportScanningToolDescriptor { | ||
/** Creates the descriptor instance. */ | ||
public Descriptor() { | ||
super(ID); | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public String getDisplayName() { | ||
return Messages.Warnings_JavaParser_ParserName(); | ||
} | ||
} | ||
} |