From 4e47bd4570c11e7cf8e6e8ef50acd60fd7e747f2 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Wed, 12 Jun 2019 21:21:09 +0530 Subject: [PATCH 1/9] Added Kotlin.java to plugins --- .../plugins/analysis/warnings/Kotlin.java | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java diff --git a/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java b/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java new file mode 100644 index 0000000000..34ef4a1bc0 --- /dev/null +++ b/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java @@ -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(); + } + } +} From 4e4b62025e1416d2c673e3df951fe312ec060789 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Thu, 13 Jun 2019 12:17:41 +0530 Subject: [PATCH 2/9] Checkstyle Changes --- .../java/io/jenkins/plugins/analysis/warnings/Kotlin.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java b/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java index 34ef4a1bc0..9709fc60b4 100644 --- a/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java +++ b/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java @@ -9,14 +9,12 @@ import org.kohsuke.stapler.DataBoundConstructor; /** - * Provides a parser and customized messages for PEP8 Python style guide. + * Provides a parser and customized messages for Kotlin errors and warnings. * * @author Sladyn Nunes */ - public class Kotlin extends ReportScanningTool { - - private static final long serialVersionUID = 00; // To be added + private static final long serialVersionUID = 2618843071479627178L; // To be added private static final String ID = "kotlin"; /** Creates a new instance of {@link Kotlin}. */ @@ -43,7 +41,7 @@ public Descriptor() { @NonNull @Override public String getDisplayName() { - return Messages.Warnings_JavaParser_ParserName(); + return Messages.Warnings_Kotlin_ParserName(); } } } From 347baae9737dab85756b9b57c6ba8715511e135f Mon Sep 17 00:00:00 2001 From: Sladyn Date: Thu, 13 Jun 2019 12:42:40 +0530 Subject: [PATCH 3/9] Added parser test --- .../io/jenkins/plugins/analysis/warnings/ParsersITest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java b/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java index 5171aeca4e..8940a5e9c5 100644 --- a/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java +++ b/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java @@ -737,6 +737,11 @@ public void shouldFindAllJavaIssues() { shouldFindIssuesOfTool(2 + 1 + 1 + 2, new Java(), "javac.txt", "gradle.java.log", "ant-javac.txt", "hpi.txt"); } + @Test + public void shouldFindAllKotlinIssues(){ + shouldFindIssuesOfTool(2,new Kotlin(),"kotlin.txt"); + } + /** Runs the CssLint parser on an output file that contains 51 issues. */ @Test public void shouldFindAllCssLintIssues() { From e83afd141dc9c341834e6be4ef56fc169e441bff Mon Sep 17 00:00:00 2001 From: Sladyn Date: Mon, 17 Jun 2019 13:41:29 +0530 Subject: [PATCH 4/9] Added kotlin.txt and resolved codacy errors --- .../plugins/analysis/warnings/Kotlin.java | 14 ++++-- .../analysis/warnings/ParsersITest.java | 3 +- .../plugins/analysis/warnings/kotlin.txt | 45 +++++++++++++++++++ 3 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 src/test/java/io/jenkins/plugins/analysis/warnings/kotlin.txt diff --git a/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java b/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java index 9709fc60b4..b4c1e4f696 100644 --- a/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java +++ b/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java @@ -14,10 +14,12 @@ * @author Sladyn Nunes */ public class Kotlin extends ReportScanningTool { - private static final long serialVersionUID = 2618843071479627178L; // To be added + private static final long serialVersionUID = 2618843071479627178L; // To be added private static final String ID = "kotlin"; - /** Creates a new instance of {@link Kotlin}. */ + /** + * Creates a new instance of {@link Kotlin}. + */ @DataBoundConstructor public Kotlin() { super(); @@ -29,11 +31,15 @@ public IssueParser createParser() { return new JavacParser(); } - /** Descriptor for this static analysis tool. */ + /** + * Descriptor for this static analysis tool. + */ @Symbol("kotlin") @Extension public static class Descriptor extends ReportScanningToolDescriptor { - /** Creates the descriptor instance. */ + /** + * Creates the descriptor instance. + */ public Descriptor() { super(ID); } diff --git a/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java b/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java index 8940a5e9c5..7ef2f1920a 100644 --- a/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java +++ b/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java @@ -737,9 +737,10 @@ public void shouldFindAllJavaIssues() { shouldFindIssuesOfTool(2 + 1 + 1 + 2, new Java(), "javac.txt", "gradle.java.log", "ant-javac.txt", "hpi.txt"); } + /** Runs the Kotlin parser on several output files that contain 4 issues. */ @Test public void shouldFindAllKotlinIssues(){ - shouldFindIssuesOfTool(2,new Kotlin(),"kotlin.txt"); + shouldFindIssuesOfTool(4,new Kotlin(),"kotlin.txt"); } /** Runs the CssLint parser on an output file that contains 51 issues. */ diff --git a/src/test/java/io/jenkins/plugins/analysis/warnings/kotlin.txt b/src/test/java/io/jenkins/plugins/analysis/warnings/kotlin.txt new file mode 100644 index 0000000000..6438d141d3 --- /dev/null +++ b/src/test/java/io/jenkins/plugins/analysis/warnings/kotlin.txt @@ -0,0 +1,45 @@ +[INFO] Scanning for projects... +[INFO] +[INFO] ----------< com.michaelrice.kotlin:hello-world-maven-example >---------- +[INFO] Building hello-world-maven-example 1.0 +[INFO] --------------------------------[ jar ]--------------------------------- +[INFO] +[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ hello-world-maven-example --- +[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! +[INFO] skip non existing resourceDirectory /Users/hafner/Development/git/kotlin-maven-hello-world/src/main/resources +[INFO] +[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ hello-world-maven-example --- +[INFO] Nothing to compile - all classes are up to date +[INFO] +[INFO] --- kotlin-maven-plugin:1.1.2:compile (compile) @ hello-world-maven-example --- +[INFO] Kotlin Compiler version 1.1.2 +[INFO] Compiling Kotlin sources from [/Users/hafner/Development/git/kotlin-maven-hello-world/src/main/kotlin] +[INFO] Module name is hello-world-maven-example +[WARNING] /Users/hafner/Development/git/kotlin-maven-hello-world/src/main/kotlin/hello.kt: (4, 11) Parameter 'args' is never used +[INFO] +[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ hello-world-maven-example --- +[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! +[INFO] skip non existing resourceDirectory /Users/hafner/Development/git/kotlin-maven-hello-world/src/test/resources +[INFO] +[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ hello-world-maven-example --- +[INFO] No sources to compile +[INFO] +[INFO] --- kotlin-maven-plugin:1.1.2:test-compile (test-compile) @ hello-world-maven-example --- +[INFO] Kotlin Compiler version 1.1.2 +[WARNING] No sources found skipping Kotlin compile +[INFO] +[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ hello-world-maven-example --- +[INFO] No tests to run. +[INFO] +[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ hello-world-maven-example --- +[INFO] Building jar: /Users/hafner/Development/git/kotlin-maven-hello-world/target/hello-world-maven-example-1.0.jar +[INFO] +[INFO] --- maven-assembly-plugin:2.6:single (make-assembly) @ hello-world-maven-example --- +[INFO] Building jar: /Users/hafner/Development/git/kotlin-maven-hello-world/target/hello-world-maven-example-1.0-jar-with-dependencies.jar +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 3.100 s +[INFO] Finished at: 2019-06-12T21:47:44+02:00 +[INFO] ------------------------------------------------------------------------ +~/D/g/kotlin-maven-hello-world (master|✚1) $ \ No newline at end of file From f3e92cc2d5d9c1540ef67fd4f7c19f330f79695e Mon Sep 17 00:00:00 2001 From: Sladyn Date: Mon, 17 Jun 2019 13:57:22 +0530 Subject: [PATCH 5/9] Added parser name in message.properties --- .../io/jenkins/plugins/analysis/warnings/Messages.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/io/jenkins/plugins/analysis/warnings/Messages.properties b/src/main/resources/io/jenkins/plugins/analysis/warnings/Messages.properties index 39e1911346..5a970d5c16 100644 --- a/src/main/resources/io/jenkins/plugins/analysis/warnings/Messages.properties +++ b/src/main/resources/io/jenkins/plugins/analysis/warnings/Messages.properties @@ -55,6 +55,7 @@ Warnings.Cargo.ParserName=Cargo Warnings.AcuCobol.ParserName=AcuCobol Compiler Warnings.JavaParser.ParserName=Java Warnings.JavaDoc.ParserName=JavaDoc +Warnings.Kotlin.ParserName=Kotlin Warnings.EclipseParser.ParserName=Eclipse ECJ Warnings.Taglist.ParserName=Maven Taglist Plugin Warnings.Maven.ParserName=Maven From 839579608c985fe28ec685bf7a9d1e1045e49e4a Mon Sep 17 00:00:00 2001 From: Sladyn Date: Mon, 17 Jun 2019 14:00:24 +0530 Subject: [PATCH 6/9] Resolved codacy errors --- .../plugins/analysis/warnings/ParsersITest.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java b/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java index 7ef2f1920a..1698a620e2 100644 --- a/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java +++ b/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java @@ -737,13 +737,17 @@ public void shouldFindAllJavaIssues() { shouldFindIssuesOfTool(2 + 1 + 1 + 2, new Java(), "javac.txt", "gradle.java.log", "ant-javac.txt", "hpi.txt"); } - /** Runs the Kotlin parser on several output files that contain 4 issues. */ + /** + * Runs the Kotlin parser on several output files that contain 4 issues. + */ @Test - public void shouldFindAllKotlinIssues(){ - shouldFindIssuesOfTool(4,new Kotlin(),"kotlin.txt"); + public void shouldFindAllKotlinIssues() { + shouldFindIssuesOfTool(4, new Kotlin(), "kotlin.txt"); } - /** Runs the CssLint parser on an output file that contains 51 issues. */ + /** + * Runs the CssLint parser on an output file that contains 51 issues. + */ @Test public void shouldFindAllCssLintIssues() { shouldFindIssuesOfTool(51, new CssLint(), "csslint.xml"); From 1a37684f19a7c129304d75e42aa9915453aef107 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Mon, 17 Jun 2019 14:49:39 +0530 Subject: [PATCH 7/9] Changed file path for kotlin.txt --- .../io/jenkins/plugins/analysis/warnings/kotlin.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/test/{java => resources}/io/jenkins/plugins/analysis/warnings/kotlin.txt (98%) diff --git a/src/test/java/io/jenkins/plugins/analysis/warnings/kotlin.txt b/src/test/resources/io/jenkins/plugins/analysis/warnings/kotlin.txt similarity index 98% rename from src/test/java/io/jenkins/plugins/analysis/warnings/kotlin.txt rename to src/test/resources/io/jenkins/plugins/analysis/warnings/kotlin.txt index 6438d141d3..c2e0494bcc 100644 --- a/src/test/java/io/jenkins/plugins/analysis/warnings/kotlin.txt +++ b/src/test/resources/io/jenkins/plugins/analysis/warnings/kotlin.txt @@ -42,4 +42,4 @@ [INFO] Total time: 3.100 s [INFO] Finished at: 2019-06-12T21:47:44+02:00 [INFO] ------------------------------------------------------------------------ -~/D/g/kotlin-maven-hello-world (master|✚1) $ \ No newline at end of file +~/D/g/kotlin-maven-hello-world (master|✚1) $ \ No newline at end of file From d38bc215b92e261acd061f8524ba886afac2fa1d Mon Sep 17 00:00:00 2001 From: Sladyn Date: Mon, 17 Jun 2019 15:34:46 +0530 Subject: [PATCH 8/9] Fixed expected issues --- .../java/io/jenkins/plugins/analysis/warnings/ParsersITest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java b/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java index 1698a620e2..cb6f363d0a 100644 --- a/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java +++ b/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java @@ -742,7 +742,7 @@ public void shouldFindAllJavaIssues() { */ @Test public void shouldFindAllKotlinIssues() { - shouldFindIssuesOfTool(4, new Kotlin(), "kotlin.txt"); + shouldFindIssuesOfTool(1, new Kotlin(), "kotlin.txt"); } /** From 06e8a73de4b09025ccd2a938914472655c6af5da Mon Sep 17 00:00:00 2001 From: Sladyn Date: Mon, 17 Jun 2019 18:05:09 +0530 Subject: [PATCH 9/9] Added license and icons --- CHANGELOG.md | 2 + SUPPORTED-FORMATS.md | 99 +++++++++--------- .../plugins/analysis/warnings/Kotlin.java | 7 ++ src/main/webapp/icons/LICENSE.txt | 9 ++ src/main/webapp/icons/kotlin-24x24.png | Bin 0 -> 753 bytes src/main/webapp/icons/kotlin-48x48.png | Bin 0 -> 1571 bytes .../analysis/warnings/ParsersITest.java | 2 +- 7 files changed, 69 insertions(+), 50 deletions(-) create mode 100644 src/main/webapp/icons/kotlin-24x24.png create mode 100644 src/main/webapp/icons/kotlin-48x48.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a683f682b..62783cd880 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Added a generic JSON parser that reads all properties of the internal `Issue` object. - [PR#57](https://github.com/jenkinsci/warnings-ng-plugin/pull/57): Added a parser for MentorGraphcis Modelsim/Questa. +- [PR#111](https://github.com/jenkinsci/warnings-ng-plugin/pull/111): + Added a Kotlin Parser. ### Fixed - [JENKINS-56007](https://issues.jenkins-ci.org/browse/JENKINS-56007): Obtain the affected files in a process on the diff --git a/SUPPORTED-FORMATS.md b/SUPPORTED-FORMATS.md index 3ff3815220..46d3b2a96b 100644 --- a/SUPPORTED-FORMATS.md +++ b/SUPPORTED-FORMATS.md @@ -1,4 +1,4 @@ - + # Supported Report Formats Jenkins' Warnings Next Generation Plugin supports the following report formats. @@ -60,7 +60,7 @@ the [Analysis Parsers Library](https://github.com/jenkinsci/analysis-model/). | 40 | go-vet | goVet() | - - | Go Vet | | | 41 | groovy | groovyScript() | - - | Groovy Parser | | | 42 | iar-cstat | iarCstat() | - - | IAR C-STAT | | -| 43 | iar | iar() | - - | IAR Compiler (C/C++) | | +| 43 | iar | iar() | - - | IAR Compiler (C/C++) | | | 44 | iblinter | ibLinter() | - - | [IBLinter](https://github.com/IBDecodable/IBLinter) | | | 45 | xlc | xlc() | - - | IBM XLC Compiler | | | 46 | infer | infer() | - - | [Infer](http://fbinfer.com) | | @@ -72,50 +72,51 @@ the [Analysis Parsers Library](https://github.com/jenkinsci/analysis-model/). | 52 | js-hint | jsHint() | - - | JSHint | | | 53 | jslint | jsLint() | - - | [JSLint](https://www.jslint.com) | | | 54 | klocwork | klocWork() | - - | Klocwork | | -| 55 | ktlint | ktLint() | ![Ktlint](src/main/webapp/icons/ktlint-24x24.png) ![Ktlint](src/main/webapp/icons/ktlint-48x48.png) | [Ktlint](https://ktlint.github.io) | | -| 56 | maven-warnings | mavenConsole() | - - | Maven | | -| 57 | taglist | tagList() | - - | [Maven Taglist Plugin](https://www.mojohaus.org/taglist-maven-plugin) | **/taglist.xml | -| 58 | modelsim | modelsim() | - - | MentorGraphics Modelsim/Questa | | -| 59 | metrowerks | metrowerksCodeWarrior() | - - | Metrowerks CodeWarrior | | -| 60 | msbuild | msBuild() | - - | MSBuild | | -| 61 | mypy | myPy() | - - | MyPy | | -| 62 | nag-fortran | nagFortran() | - - | NAG Fortran Compiler | | -| 63 | open-tasks | taskScanner() | ![Open Tasks Scanner](src/main/webapp/icons/open-tasks-24x24.png) ![Open Tasks Scanner](src/main/webapp/icons/open-tasks-48x48.png) | Open Tasks Scanner | - | -| 64 | invalids | invalids() | - - | Oracle Invalids | | -| 65 | pclint | pcLint() | - - | PC-Lint | | -| 66 | pep8 | pep8() | - - | Pep8 | | -| 67 | perforce | perforce() | - - | Perforce Compiler | | -| 68 | perl-critic | perlCritic() | - - | Perl::Critic | | -| 69 | php | php() | - - | PHP Runtime | | -| 70 | php-code-sniffer | phpCodeSniffer() | - - | [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) | | -| 71 | phpstan | phpStan() | ![PHPStan](src/main/webapp/icons/phpstan-24x24.png) ![PHPStan](src/main/webapp/icons/phpstan-48x48.png) | [PHPStan](https://github.com/phpstan/phpstan) | | -| 72 | pit | pit() | ![Pit Test Coverage](src/main/webapp/icons/pit-24x24.png) ![Pit Test Coverage](src/main/webapp/icons/pit-48x48.png) | [Pit Test Coverage](http://pitest.org) | | -| 73 | pmd | pmdParser() | ![PMD](src/main/webapp/icons/pmd-24x24.png) ![PMD](src/main/webapp/icons/pmd-48x48.png) | [PMD](https://pmd.github.io) | **/pmd.xml | -| 74 | prefast | prefast() | - - | PREfast | | -| 75 | puppetlint | puppetLint() | - - | Puppet-Lint | | -| 76 | pydocstyle | pyDocStyle() | - - | Pydocstyle | | -| 77 | pylint | pyLint() | ![Pylint](src/main/webapp/icons/pylint-24x24.png) ![Pylint](src/main/webapp/icons/pylint-48x48.png) | Pylint | | -| 78 | qac | qacSourceCodeAnalyser() | - - | QA-C Sourcecode Analyser | | -| 79 | dupfinder | dupFinder() | ![Resharper dupFinder](src/main/webapp/icons/dry-24x24.png) ![Resharper dupFinder](src/main/webapp/icons/dry-48x48.png) | Resharper dupFinder | | -| 80 | resharper | resharperInspectCode() | ![Resharper InspectCode](src/main/webapp/icons/resharper-24x24.png) ![Resharper InspectCode](src/main/webapp/icons/resharper-48x48.png) | Resharper InspectCode | | -| 81 | robocopy | robocopy() | - - | Robocopy | | -| 82 | rflint | rfLint() | ![Robot Framework Lint](src/main/webapp/icons/robot-framework-24x24.png) ![Robot Framework Lint](src/main/webapp/icons/robot-framework-48x48.png) | Robot Framework Lint | | -| 83 | rubocop | ruboCop() | ![RuboCop](src/main/webapp/icons/rubocop-24x24.png) ![RuboCop](src/main/webapp/icons/rubocop-48x48.png) | RuboCop | | -| 84 | scala | scala() | ![Scala Compiler](src/main/webapp/icons/scala-24x24.png) ![Scala Compiler](src/main/webapp/icons/scala-48x48.png) | Scala Compiler | | -| 85 | simian | simian() | ![Simian](src/main/webapp/icons/dry-24x24.png) ![Simian](src/main/webapp/icons/dry-48x48.png) | Simian | | -| 86 | sonar | sonarQube() | ![SonarQube](src/main/webapp/icons/sonar-24x24.png) ![SonarQube](src/main/webapp/icons/sonar-48x48.png) | SonarQube | **/sonar-report.json | -| 87 | sphinx | sphinxBuild() | - - | Sphinx-build | | -| 88 | spotbugs | spotBugs() | ![SpotBugs](src/main/webapp/icons/spotbugs-24x24.png) ![SpotBugs](src/main/webapp/icons/spotbugs-48x48.png) | [SpotBugs](https://spotbugs.github.io) | **/spotbugsXml.xml | -| 89 | stylecop | styleCop() | - - | StyleCop | | -| 90 | sunc | sunC() | - - | SUN C++ Compiler | | -| 91 | swiftlint | swiftLint() | - - | [SwiftLint](https://github.com/realm/SwiftLint) | | -| 92 | tasking-vx | taskingVx() | - - | TASKING VX Compiler | | -| 93 | code-composer | tiCss() | - - | Texas Instruments Code Composer Studio | | -| 94 | tnsdl | tnsdl() | - - | TNSDL Translator | | -| 95 | tslint | tsLint() | - - | [TSLint](https://palantir.github.io/tslint/) | | -| 96 | issues | issues() | - - | Warnings Plugin Native Format | | -| 97 | diabc | diabC() | - - | Wind River Diab Compiler (C/C++) | | -| 98 | xmllint | xmlLint() | - - | XML Lint | | -| 99 | yamllint | yamlLint() | - - | [YamlLint](https://yamllint.readthedocs.io/) | | -| 100 | yui | yuiCompressor() | - - | YUI Compressor | | -| 101 | zptlint | zptLint() | - - | ZPT Lint | | +| 55 | kotlin | kotlin() | ![Kotlin](src/main/webapp/icons/kotlin-24x24.png) ![Kotlin](src/main/webapp/icons/kotlin-48x48.png) | Kotlin | | +| 56 | ktlint | ktLint() | ![Ktlint](src/main/webapp/icons/ktlint-24x24.png) ![Ktlint](src/main/webapp/icons/ktlint-48x48.png) | [Ktlint](https://ktlint.github.io) | | +| 57 | maven-warnings | mavenConsole() | - - | Maven | | +| 58 | taglist | tagList() | - - | [Maven Taglist Plugin](https://www.mojohaus.org/taglist-maven-plugin) | **/taglist.xml | +| 59 | modelsim | modelsim() | - - | MentorGraphics Modelsim/Questa | | +| 60 | metrowerks | metrowerksCodeWarrior() | - - | Metrowerks CodeWarrior | | +| 61 | msbuild | msBuild() | - - | MSBuild | | +| 62 | mypy | myPy() | - - | MyPy | | +| 63 | nag-fortran | nagFortran() | - - | NAG Fortran Compiler | | +| 64 | open-tasks | taskScanner() | ![Open Tasks Scanner](src/main/webapp/icons/open-tasks-24x24.png) ![Open Tasks Scanner](src/main/webapp/icons/open-tasks-48x48.png) | Open Tasks Scanner | - | +| 65 | invalids | invalids() | - - | Oracle Invalids | | +| 66 | pclint | pcLint() | - - | PC-Lint | | +| 67 | pep8 | pep8() | - - | Pep8 | | +| 68 | perforce | perforce() | - - | Perforce Compiler | | +| 69 | perl-critic | perlCritic() | - - | Perl::Critic | | +| 70 | php | php() | - - | PHP Runtime | | +| 71 | php-code-sniffer | phpCodeSniffer() | - - | [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) | | +| 72 | phpstan | phpStan() | ![PHPStan](src/main/webapp/icons/phpstan-24x24.png) ![PHPStan](src/main/webapp/icons/phpstan-48x48.png) | [PHPStan](https://github.com/phpstan/phpstan) | | +| 73 | pit | pit() | ![Pit Test Coverage](src/main/webapp/icons/pit-24x24.png) ![Pit Test Coverage](src/main/webapp/icons/pit-48x48.png) | [Pit Test Coverage](http://pitest.org) | | +| 74 | pmd | pmdParser() | ![PMD](src/main/webapp/icons/pmd-24x24.png) ![PMD](src/main/webapp/icons/pmd-48x48.png) | [PMD](https://pmd.github.io) | **/pmd.xml | +| 75 | prefast | prefast() | - - | PREfast | | +| 76 | puppetlint | puppetLint() | - - | Puppet-Lint | | +| 77 | pydocstyle | pyDocStyle() | - - | Pydocstyle | | +| 78 | pylint | pyLint() | ![Pylint](src/main/webapp/icons/pylint-24x24.png) ![Pylint](src/main/webapp/icons/pylint-48x48.png) | Pylint | | +| 79 | qac | qacSourceCodeAnalyser() | - - | QA-C Sourcecode Analyser | | +| 80 | dupfinder | dupFinder() | ![Resharper dupFinder](src/main/webapp/icons/dry-24x24.png) ![Resharper dupFinder](src/main/webapp/icons/dry-48x48.png) | Resharper dupFinder | | +| 81 | resharper | resharperInspectCode() | ![Resharper InspectCode](src/main/webapp/icons/resharper-24x24.png) ![Resharper InspectCode](src/main/webapp/icons/resharper-48x48.png) | Resharper InspectCode | | +| 82 | robocopy | robocopy() | - - | Robocopy | | +| 83 | rflint | rfLint() | ![Robot Framework Lint](src/main/webapp/icons/robot-framework-24x24.png) ![Robot Framework Lint](src/main/webapp/icons/robot-framework-48x48.png) | Robot Framework Lint | | +| 84 | rubocop | ruboCop() | ![RuboCop](src/main/webapp/icons/rubocop-24x24.png) ![RuboCop](src/main/webapp/icons/rubocop-48x48.png) | RuboCop | | +| 85 | scala | scala() | ![Scala Compiler](src/main/webapp/icons/scala-24x24.png) ![Scala Compiler](src/main/webapp/icons/scala-48x48.png) | Scala Compiler | | +| 86 | simian | simian() | ![Simian](src/main/webapp/icons/dry-24x24.png) ![Simian](src/main/webapp/icons/dry-48x48.png) | Simian | | +| 87 | sonar | sonarQube() | ![SonarQube](src/main/webapp/icons/sonar-24x24.png) ![SonarQube](src/main/webapp/icons/sonar-48x48.png) | SonarQube | **/sonar-report.json | +| 88 | sphinx | sphinxBuild() | - - | Sphinx-build | | +| 89 | spotbugs | spotBugs() | ![SpotBugs](src/main/webapp/icons/spotbugs-24x24.png) ![SpotBugs](src/main/webapp/icons/spotbugs-48x48.png) | [SpotBugs](https://spotbugs.github.io) | **/spotbugsXml.xml | +| 90 | stylecop | styleCop() | - - | StyleCop | | +| 91 | sunc | sunC() | - - | SUN C++ Compiler | | +| 92 | swiftlint | swiftLint() | - - | [SwiftLint](https://github.com/realm/SwiftLint) | | +| 93 | tasking-vx | taskingVx() | - - | TASKING VX Compiler | | +| 94 | code-composer | tiCss() | - - | Texas Instruments Code Composer Studio | | +| 95 | tnsdl | tnsdl() | - - | TNSDL Translator | | +| 96 | tslint | tsLint() | - - | [TSLint](https://palantir.github.io/tslint/) | | +| 97 | issues | issues() | - - | [Warnings Plugin Native Format](https://github.com/jenkinsci/warnings-ng-plugin/blob/master/doc/Documentation.md#export-your-issues-into-a-supported-format) | | +| 98 | diabc | diabC() | - - | Wind River Diab Compiler (C/C++) | | +| 99 | xmllint | xmlLint() | - - | XML Lint | | +| 100 | yamllint | yamlLint() | - - | [YamlLint](https://yamllint.readthedocs.io/) | | +| 101 | yui | yuiCompressor() | - - | YUI Compressor | | +| 102 | zptlint | zptLint() | - - | ZPT Lint | | diff --git a/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java b/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java index b4c1e4f696..9f25423b63 100644 --- a/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java +++ b/src/main/java/io/jenkins/plugins/analysis/warnings/Kotlin.java @@ -4,7 +4,9 @@ import edu.hm.hafner.analysis.parser.JavacParser; import edu.umd.cs.findbugs.annotations.NonNull; import hudson.Extension; +import io.jenkins.plugins.analysis.core.model.IconLabelProvider; import io.jenkins.plugins.analysis.core.model.ReportScanningTool; +import io.jenkins.plugins.analysis.core.model.StaticAnalysisLabelProvider; import org.jenkinsci.Symbol; import org.kohsuke.stapler.DataBoundConstructor; @@ -49,5 +51,10 @@ public Descriptor() { public String getDisplayName() { return Messages.Warnings_Kotlin_ParserName(); } + + @Override + public StaticAnalysisLabelProvider getLabelProvider() { + return new IconLabelProvider(getId(), getDisplayName()); + } } } diff --git a/src/main/webapp/icons/LICENSE.txt b/src/main/webapp/icons/LICENSE.txt index fd0f4b9715..cd395d6aad 100644 --- a/src/main/webapp/icons/LICENSE.txt +++ b/src/main/webapp/icons/LICENSE.txt @@ -122,3 +122,12 @@ At the time of writing: The icons were downloaded from the official robot framework visual identity github page and were resized. No other modifications were made. + + +------------------------------------------------------------------------------ + +License for Kotlin Icons + +The kotlin logo has been referenced from https://kotlinlang.org/docs/reference/faq.html#where-can-i-get-an-hd-kotlin-logo +The link to https://www.jetbrains.com has been provided as a license agreement. +No modifications to the icon were made except the scale has been brought down to 48x48. \ No newline at end of file diff --git a/src/main/webapp/icons/kotlin-24x24.png b/src/main/webapp/icons/kotlin-24x24.png new file mode 100644 index 0000000000000000000000000000000000000000..02d288dbed2d3886d962d9b61d4a4e2594248215 GIT binary patch literal 753 zcmVQr8wiO~8r4$t0iB0D9$v3aed@wUG=XcLJm%%;L8!V|2q*Q_) z4WU~j=+@A@@6-r74FvCXqkqu%-0p!Pa9 z2pp2q2$C(FOzb`kh`N2+L-^#0>)T^|5);60;yRe(&79119R)mqcZ)t#TWyK8VC*~ z!T=&6oZ#xYSw?7;>vy6+Q5Y`I$FdnN9OI`B62=Lxac$3;!e%3pj5p-L)1tiMAj4h}W zTsk%90v31n$PfC5M8OdafP^U?izD+U;BBuUPiF?ixE+ZL;T`C;sOsbLI^lirHI4u( zQXwsv|Dxi^0(;(P3wqmNq!n{FvJ00000NkvXXu0mjf=F3OJ literal 0 HcmV?d00001 diff --git a/src/main/webapp/icons/kotlin-48x48.png b/src/main/webapp/icons/kotlin-48x48.png new file mode 100644 index 0000000000000000000000000000000000000000..c5a890919813ffc5f23f28255f5d511ba0dea63e GIT binary patch literal 1571 zcmV+;2Hg3HP)aYnoyiY1BZ87m)bS6?`b-gHN{g)@mCS`k=npnndiTp=FDg zmaQ$cR1_>$C=@hQ479}+G*ugu)?^z)rlcASUJyjAsb=Pv|F-kbWp`$FCvhQUGn*{u zJLfy+{IkL4H?NXv6QRmPs5TJf^C}adQe3Cc>FfMwfF&lfuSxjCK-f($-72qLsm z%fz|lfDGcO@5fC3Ofb$YArJ`ubbIYgo0^9tEY;-QnAP;y#1 zN9^&$20*F|(%=oIPgIrg(#BgM^{R(Xg(`6>{vZ#Q1|Km*vCMlb6cS>Xe;(#GZAgjS)#D{Iu~`$fpt`e{K?FQ%e>6C8={0t07=*M{83WyffV}b`paAorii6aBoILQmiGQ0TARRA zXlA-s1Wg+?ECgL_R)f1nEEwt9SAQ)z^S)E4V{QfpW{)eGS0R)p7R~FelO2L5!Gstw z(zUP6mK}Uig|6%UqESV#OrHoK!04;r^FvwM_$o9#bwJE{p^Y4y)3dJ0If`HlAw0A5r zZ9Em4%)MjFJa5XN5Y}>YRw9N*y0L#G^32;5`hM(vr9rKrt;xc#K|a$~V|!IXUYq#m z0sX?womwi>x&WU|a0I;i{2pS`2B5T7fSx1b(;U4VOX^B1|Q&;Jx~%u!Utl&b}500#0ygftIMPzSiF+Phx-r{kNFGV6;CfuqkH{ygnSRjq;f7hTVwm^ z^~2d@AC002ovPDHLkV1o74@7(|Z literal 0 HcmV?d00001 diff --git a/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java b/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java index cb6f363d0a..3a47264545 100644 --- a/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java +++ b/src/test/java/io/jenkins/plugins/analysis/warnings/ParsersITest.java @@ -738,7 +738,7 @@ public void shouldFindAllJavaIssues() { } /** - * Runs the Kotlin parser on several output files that contain 4 issues. + * Runs the Kotlin parser on several output files that contain 1 issues. */ @Test public void shouldFindAllKotlinIssues() {