This repository has been archived by the owner on Apr 6, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let all parsers not depend on Jenkins anymore.
Integrated all parsers into new module analysis-model. Added adapter classes for parsers of violations-lib. - [FIXED JENKINS-17434] - [FIXED JENKINS-40439]
- Loading branch information
Showing
32 changed files
with
1,184 additions
and
15 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
src/main/java/io/jenkins/plugins/analysis/warnings/AndroidLint.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,45 @@ | ||
package io.jenkins.plugins.analysis.warnings; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
import io.jenkins.plugins.analysis.core.model.StaticAnalysisTool; | ||
|
||
import hudson.Extension; | ||
|
||
import edu.hm.hafner.analysis.parser.violations.AndroidLintParserAdapter; | ||
|
||
/** | ||
* Provides a parser and customized messages for Android Lint. | ||
* | ||
* @author Ullrich Hafner | ||
*/ | ||
public class AndroidLint extends StaticAnalysisTool { | ||
static final String ID = "android-lint"; | ||
|
||
/** Creates a new instance of {@link AndroidLint}. */ | ||
@DataBoundConstructor | ||
public AndroidLint() { | ||
// empty constructor required for stapler | ||
} | ||
|
||
@Override | ||
public AndroidLintParserAdapter createParser() { | ||
return new AndroidLintParserAdapter(); | ||
} | ||
|
||
/** Descriptor for this static analysis tool. */ | ||
@Extension | ||
public static class Descriptor extends StaticAnalysisToolDescriptor { | ||
public Descriptor() { | ||
super(ID); | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public String getDisplayName() { | ||
return Messages.Violations_AndroidLint(); | ||
} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/io/jenkins/plugins/analysis/warnings/CodeNArc.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,45 @@ | ||
package io.jenkins.plugins.analysis.warnings; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
import io.jenkins.plugins.analysis.core.model.StaticAnalysisTool; | ||
|
||
import hudson.Extension; | ||
|
||
import edu.hm.hafner.analysis.parser.violations.CodeNarcAdapter; | ||
|
||
/** | ||
* Provides a parser and customized messages for CodeNArc. | ||
* | ||
* @author Ullrich Hafner | ||
*/ | ||
public class CodeNArc extends StaticAnalysisTool { | ||
static final String ID = "codenarc"; | ||
|
||
/** Creates a new instance of {@link CodeNArc}. */ | ||
@DataBoundConstructor | ||
public CodeNArc() { | ||
// empty constructor required for stapler | ||
} | ||
|
||
@Override | ||
public CodeNarcAdapter createParser() { | ||
return new CodeNarcAdapter(); | ||
} | ||
|
||
/** Descriptor for this static analysis tool. */ | ||
@Extension | ||
public static class Descriptor extends StaticAnalysisToolDescriptor { | ||
public Descriptor() { | ||
super(ID); | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public String getDisplayName() { | ||
return Messages.Violations_CodeNarc(); | ||
} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/io/jenkins/plugins/analysis/warnings/CppCheck.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,45 @@ | ||
package io.jenkins.plugins.analysis.warnings; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
import io.jenkins.plugins.analysis.core.model.StaticAnalysisTool; | ||
|
||
import hudson.Extension; | ||
|
||
import edu.hm.hafner.analysis.parser.violations.CppCheckAdapter; | ||
|
||
/** | ||
* Provides a parser and customized messages for CPPCheck. | ||
* | ||
* @author Ullrich Hafner | ||
*/ | ||
public class CppCheck extends StaticAnalysisTool { | ||
static final String ID = "cppcheck"; | ||
|
||
/** Creates a new instance of {@link CppCheck}. */ | ||
@DataBoundConstructor | ||
public CppCheck() { | ||
// empty constructor required for stapler | ||
} | ||
|
||
@Override | ||
public CppCheckAdapter createParser() { | ||
return new CppCheckAdapter(); | ||
} | ||
|
||
/** Descriptor for this static analysis tool. */ | ||
@Extension | ||
public static class Descriptor extends StaticAnalysisToolDescriptor { | ||
public Descriptor() { | ||
super(ID); | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public String getDisplayName() { | ||
return Messages.Violations_CPPCheck(); | ||
} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/io/jenkins/plugins/analysis/warnings/DocFx.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,45 @@ | ||
package io.jenkins.plugins.analysis.warnings; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
import io.jenkins.plugins.analysis.core.model.StaticAnalysisTool; | ||
|
||
import hudson.Extension; | ||
|
||
import edu.hm.hafner.analysis.parser.violations.DocFxAdapter; | ||
|
||
/** | ||
* Provides a parser and customized messages for DocFX. | ||
* | ||
* @author Ullrich Hafner | ||
*/ | ||
public class DocFx extends StaticAnalysisTool { | ||
static final String ID = "docfx"; | ||
|
||
/** Creates a new instance of {@link DocFx}. */ | ||
@DataBoundConstructor | ||
public DocFx() { | ||
// empty constructor required for stapler | ||
} | ||
|
||
@Override | ||
public DocFxAdapter createParser() { | ||
return new DocFxAdapter(); | ||
} | ||
|
||
/** Descriptor for this static analysis tool. */ | ||
@Extension | ||
public static class Descriptor extends StaticAnalysisToolDescriptor { | ||
public Descriptor() { | ||
super(ID); | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public String getDisplayName() { | ||
return Messages.Violations_DocFx(); | ||
} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/io/jenkins/plugins/analysis/warnings/ErrorProne.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,45 @@ | ||
package io.jenkins.plugins.analysis.warnings; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
import io.jenkins.plugins.analysis.core.model.StaticAnalysisTool; | ||
|
||
import hudson.Extension; | ||
|
||
import edu.hm.hafner.analysis.parser.violations.ErrorProneAdapter; | ||
|
||
/** | ||
* Provides a parser and customized messages for Error Prone. | ||
* | ||
* @author Ullrich Hafner | ||
*/ | ||
public class ErrorProne extends StaticAnalysisTool { | ||
static final String ID = "error-prone"; | ||
|
||
/** Creates a new instance of {@link ErrorProne}. */ | ||
@DataBoundConstructor | ||
public ErrorProne() { | ||
// empty constructor required for stapler | ||
} | ||
|
||
@Override | ||
public ErrorProneAdapter createParser() { | ||
return new ErrorProneAdapter(); | ||
} | ||
|
||
/** Descriptor for this static analysis tool. */ | ||
@Extension | ||
public static class Descriptor extends StaticAnalysisToolDescriptor { | ||
public Descriptor() { | ||
super(ID); | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public String getDisplayName() { | ||
return Messages.Violations_ErrorProne(); | ||
} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/io/jenkins/plugins/analysis/warnings/Flake8.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,45 @@ | ||
package io.jenkins.plugins.analysis.warnings; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
import io.jenkins.plugins.analysis.core.model.StaticAnalysisTool; | ||
|
||
import hudson.Extension; | ||
|
||
import edu.hm.hafner.analysis.parser.violations.Flake8Adapter; | ||
|
||
/** | ||
* Provides a parser and customized messages for Android Lint. | ||
* | ||
* @author Ullrich Hafner | ||
*/ | ||
public class Flake8 extends StaticAnalysisTool { | ||
static final String ID = "flake8"; | ||
|
||
/** Creates a new instance of {@link Flake8}. */ | ||
@DataBoundConstructor | ||
public Flake8() { | ||
// empty constructor required for stapler | ||
} | ||
|
||
@Override | ||
public Flake8Adapter createParser() { | ||
return new Flake8Adapter(); | ||
} | ||
|
||
/** Descriptor for this static analysis tool. */ | ||
@Extension | ||
public static class Descriptor extends StaticAnalysisToolDescriptor { | ||
public Descriptor() { | ||
super(ID); | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public String getDisplayName() { | ||
return Messages.Violations_Flake8(); | ||
} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/io/jenkins/plugins/analysis/warnings/JsHint.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,45 @@ | ||
package io.jenkins.plugins.analysis.warnings; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
import io.jenkins.plugins.analysis.core.model.StaticAnalysisTool; | ||
|
||
import hudson.Extension; | ||
|
||
import edu.hm.hafner.analysis.parser.violations.JsHintAdapter; | ||
|
||
/** | ||
* Provides a parser and customized messages for JsHint. | ||
* | ||
* @author Ullrich Hafner | ||
*/ | ||
public class JsHint extends StaticAnalysisTool { | ||
static final String ID = "js-hint"; | ||
|
||
/** Creates a new instance of {@link JsHint}. */ | ||
@DataBoundConstructor | ||
public JsHint() { | ||
// empty constructor required for stapler | ||
} | ||
|
||
@Override | ||
public JsHintAdapter createParser() { | ||
return new JsHintAdapter(); | ||
} | ||
|
||
/** Descriptor for this static analysis tool. */ | ||
@Extension | ||
public static class Descriptor extends StaticAnalysisToolDescriptor { | ||
public Descriptor() { | ||
super(ID); | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public String getDisplayName() { | ||
return Messages.Violations_JSHint(); | ||
} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
src/main/java/io/jenkins/plugins/analysis/warnings/KlocWork.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,45 @@ | ||
package io.jenkins.plugins.analysis.warnings; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
import io.jenkins.plugins.analysis.core.model.StaticAnalysisTool; | ||
|
||
import hudson.Extension; | ||
|
||
import edu.hm.hafner.analysis.parser.violations.KlocWorkAdapter; | ||
|
||
/** | ||
* Provides a parser and customized messages for Klocwork. | ||
* | ||
* @author Ullrich Hafner | ||
*/ | ||
public class KlocWork extends StaticAnalysisTool { | ||
static final String ID = "klocwork"; | ||
|
||
/** Creates a new instance of {@link KlocWork}. */ | ||
@DataBoundConstructor | ||
public KlocWork() { | ||
// empty constructor required for stapler | ||
} | ||
|
||
@Override | ||
public KlocWorkAdapter createParser() { | ||
return new KlocWorkAdapter(); | ||
} | ||
|
||
/** Descriptor for this static analysis tool. */ | ||
@Extension | ||
public static class Descriptor extends StaticAnalysisToolDescriptor { | ||
public Descriptor() { | ||
super(ID); | ||
} | ||
|
||
@Nonnull | ||
@Override | ||
public String getDisplayName() { | ||
return Messages.Violations_Klocwork(); | ||
} | ||
} | ||
} |
Oops, something went wrong.