Skip to content
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

Merged
merged 9 commits into from
Jun 17, 2019
Merged

Kotlin plugin #111

merged 9 commits into from
Jun 17, 2019

Conversation

sladyn98
Copy link

No description provided.

@sladyn98 sladyn98 force-pushed the kotlin_plugin branch 5 times, most recently from 1d6eefe to 79f137d Compare June 12, 2019 16:12
@jenkinsci jenkinsci deleted a comment Jun 12, 2019
Copy link
Member

@uhafner uhafner left a 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();
}
}
Copy link
Member

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).

Copy link
Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sladyn98
Copy link
Author

@uhafner Kindly review

@uhafner
Copy link
Member

uhafner commented Jun 15, 2019

The file kotlin.txt is also missing in the commits. Please also make sure that Codacy does not report any new issues.

@sladyn98
Copy link
Author

sladyn98 commented Jun 16, 2019

The file kotlin.txt is also missing in the commits. Please also make sure that Codacy does not report any new issues.

@uhafner Should I put the file you sent in as kotlin.txt
Also ignore the accidental close

@sladyn98 sladyn98 closed this Jun 16, 2019
@sladyn98 sladyn98 reopened this Jun 16, 2019
@uhafner
Copy link
Member

uhafner commented Jun 16, 2019

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).

@jenkinsci jenkinsci deleted a comment Jun 17, 2019
@jenkinsci jenkinsci deleted a comment Jun 17, 2019
@jenkinsci jenkinsci deleted a comment Jun 17, 2019
@jenkinsci jenkinsci deleted a comment Jun 17, 2019
@jenkinsci jenkinsci deleted a comment Jun 17, 2019
@jenkinsci jenkinsci deleted a comment Jun 17, 2019
@jenkinsci jenkinsci deleted a comment Jun 17, 2019
@jenkinsci jenkinsci deleted a comment Jun 17, 2019
@sladyn98
Copy link
Author

@uhafner made the changes

public String getDisplayName() {
return Messages.Warnings_JavaParser_ParserName();
}
}
Copy link
Member

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contains 1 issue

Copy link
Author

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 ?

Copy link
Member

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).

@uhafner
Copy link
Member

uhafner commented Jun 17, 2019

You can also add a new entry in the ChangeLog file and run the ToolLister test shouldPrintAllRegisteredTools, then you automatically get an update of the SUPPORTED_TOOLS document.

@sladyn98
Copy link
Author

You can also add a new entry in the ChangeLog file and run the ToolLister test shouldPrintAllRegisteredTools, then you automatically get an update of the SUPPORTED_TOOLS document.

Yeah I will make changes to the https://github.com/jenkinsci/warnings-ng-plugin/blob/master/CHANGELOG.md .
In terms of running the toolLister I did not quite get what you mean could you be a little more specific?

@codecov
Copy link

codecov bot commented Jun 17, 2019

Codecov Report

Merging #111 into master will increase coverage by 0.23%.
The diff coverage is 85.71%.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ Complexity Δ
...a/io/jenkins/plugins/analysis/warnings/Kotlin.java 85.71% <85.71%> (ø) 2 <2> (?)
...alysis/core/model/StaticAnalysisLabelProvider.java 95.78% <0%> (+2.1%) 40% <0%> (+2%) ⬆️
...kins/plugins/analysis/core/model/ResultAction.java 78.57% <0%> (+2.38%) 22% <0%> (+1%) ⬆️
...kins/plugins/analysis/core/model/IssuesDetail.java 86.02% <0%> (+4.3%) 40% <0%> (ø) ⬇️
...ugins/analysis/core/columns/IssuesTotalColumn.java 81.33% <0%> (+6.66%) 13% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a29eb05...06e8a73. Read the comment docs.

@uhafner
Copy link
Member

uhafner commented Jun 17, 2019

Open the class ToolLister in IntelliJ and start the Unit test. Then the supported tools are automatically updated.

@sladyn98
Copy link
Author

sladyn98 commented Jun 17, 2019

All changes have been made 👍

@uhafner uhafner merged commit ee76c41 into jenkinsci:master Jun 17, 2019
@uhafner
Copy link
Member

uhafner commented Jun 17, 2019

Thank you very much for your first time contribution!

🎉

@sladyn98
Copy link
Author

@uhafner Thanks for the mentorship and advice really appreciate it. Looking forward to contributing more to this plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants