-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kotlin plugin #111
Kotlin plugin #111
Conversation
1d6eefe
to
79f137d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have a test in ParsersITest that reads an actual file from a Kotlin build that contains a warning.
Example
[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) $
public String getDisplayName() { | ||
return Messages.Warnings_JavaParser_ParserName(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an icon available that can be included in the warnings-plugin? (Check License).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think we can use the android one, so NO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uhafner Kindly review |
The file |
Well, you can use this file as kotlin.txt if you like. Your test just breaks because the file is not part of the PR. (As well as your changes in the properties file). |
@uhafner made the changes |
public String getDisplayName() { | ||
return Messages.Warnings_JavaParser_ParserName(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -737,7 +737,17 @@ public void shouldFindAllJavaIssues() { | |||
shouldFindIssuesOfTool(2 + 1 + 1 + 2, new Java(), "javac.txt", "gradle.java.log", "ant-javac.txt", "hpi.txt"); | |||
} | |||
|
|||
/** Runs the CssLint parser on an output file that contains 51 issues. */ | |||
/** | |||
* Runs the Kotlin parser on several output files that contain 4 issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contains 1 issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do I upload the logo and do we want only a logo or a log and text with it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logos are in https://github.com/jenkinsci/warnings-ng-plugin/tree/master/src/main/webapp/icons. Please add a line that references the license somehow in the License.txt file.
You can have a look at the https://github.com/jenkinsci/warnings-ng-plugin/blob/master/src/main/java/io/jenkins/plugins/analysis/warnings/AndroidLint.java to see how icons are used.
If everything is working correctly you will see the result in https://github.com/jenkinsci/warnings-ng-plugin/blob/master/SUPPORTED-FORMATS.md (after running the ToolLister
).
You can also add a new entry in the ChangeLog file and run the |
Yeah I will make changes to the https://github.com/jenkinsci/warnings-ng-plugin/blob/master/CHANGELOG.md . |
Codecov Report
@@ Coverage Diff @@
## master #111 +/- ##
============================================
+ Coverage 83.14% 83.38% +0.23%
- Complexity 1517 1523 +6
============================================
Files 239 240 +1
Lines 5080 5087 +7
Branches 399 399
============================================
+ Hits 4224 4242 +18
+ Misses 704 695 -9
+ Partials 152 150 -2
Continue to review full report at Codecov.
|
Open the class |
All changes have been made 👍 |
Thank you very much for your first time contribution! 🎉 |
@uhafner Thanks for the mentorship and advice really appreciate it. Looking forward to contributing more to this plugin. |
No description provided.