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

Bump Kotlin-related dependencies #225

Merged
merged 1 commit into from
Nov 9, 2020
Merged

Bump Kotlin-related dependencies #225

merged 1 commit into from
Nov 9, 2020

Conversation

snooze92
Copy link
Contributor

@snooze92 snooze92 commented Oct 18, 2020

With this change, we bump all Kotlin-related dependencies to recent versions. This includes a Kotlin bump from 1.3 to 1.4, the migration from com.github.shyiko.ktlint to com.pinterest.ktlint and a significant upgrade of Detekt from 1.0.0-RC14 to 1.14.0.

For running Detekt, a new tooling API was introduced. This means that the code that invoke Detekt can change not to use internal classes anymore. Calling a Kotlin DSL from Java looks a little verbose, but it still works nicely.

For tests, the Detekt YAML file was reset from the latest default, then adapted slightly so the expected rules still get triggered. A few more minor changes were made to match expectations with the latest version. I also add a specific test for a new Detekt rule that has been added since the previous version we were using here...

In terms of migration/changelog:

With this change, we bump all Kotlin-related dependencies to recent
versions. This includes a Kotlin bump from 1.3 to 1.4, the migration
from com.github.shyiko.ktlint to com.pinterest.ktlint and a significant
upgrade of Detekt from 1.0.0-RC14 to 1.14.0.

For running Detekt, a new tooling API was introduced. This means that
the code that invoke Detekt can change not to use internal classes
anymore. Calling a Kotlin DSL from Java looks a little verbose, but it
still works nicely.

For tests, the Detekt YAML file was reset from the latest default, then
adapted slightly so the expected rules still get triggered. A few more
minor changes were made to match expectations with the latest version.
I also add a specific test for a new Detekt rule that has been added since
the previous version we were using here...

In terms of migration/changelong:

- Changelog of Detekt RC versions:
  https://arturbosch.github.io/detekt/changelog-rc.html

- Detekt include/exclude migration:
  https://arturbosch.github.io/detekt/howto-migratetestpattern.html

- Release notes of Detekt, since:
  https://arturbosch.github.io/detekt/changelog.html

- KtLint changelog:
  https://github.com/pinterest/ktlint/releases
@codecov-io
Copy link

Codecov Report

Merging #225 into master will decrease coverage by 0.87%.
The diff coverage is 74.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #225      +/-   ##
============================================
- Coverage     73.25%   72.38%   -0.88%     
+ Complexity      612      608       -4     
============================================
  Files           146      146              
  Lines          1963     1988      +25     
  Branches        128      131       +3     
============================================
+ Hits           1438     1439       +1     
- Misses          468      489      +21     
- Partials         57       60       +3     
Impacted Files Coverage Δ Complexity Δ
...sputnik/processor/detekt/LoggingFileProcessor.java 0.00% <0.00%> (-80.00%) 0.00 <0.00> (-8.00)
...k/sputnik/processor/ktlint/LintErrorConverter.java 100.00% <ø> (ø) 5.00 <0.00> (ø)
...touk/sputnik/processor/detekt/DetektProcessor.java 82.92% <88.88%> (-2.79%) 13.00 <7.00> (+3.00) ⬇️
...l/touk/sputnik/processor/detekt/ResultBuilder.java 80.95% <91.66%> (+2.00%) 8.00 <3.00> (+1.00)
...touk/sputnik/processor/ktlint/KtlintProcessor.java 88.46% <100.00%> (+0.46%) 9.00 <0.00> (ø)

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 b991f9d...6bc13fb. Read the comment docs.

@snooze92
Copy link
Contributor Author

Not sure how to improve coverage on LoggingFileProcessor, as it looks like an unused class in my project with mostly void methods. The only tests I can think of for this look quite silly!

@SpOOnman SpOOnman merged commit 6f1869b into TouK:master Nov 9, 2020
@SpOOnman
Copy link
Collaborator

SpOOnman commented Nov 9, 2020

Thank for your contribution! This is a great work! 👍

@snooze92 snooze92 deleted the bump-detekt branch November 9, 2020 08:25
rufuslevi pushed a commit to rufuslevi/sputnik that referenced this pull request Mar 12, 2024
With this change, we bump all Kotlin-related dependencies to recent
versions. This includes a Kotlin bump from 1.3 to 1.4, the migration
from com.github.shyiko.ktlint to com.pinterest.ktlint and a significant
upgrade of Detekt from 1.0.0-RC14 to 1.14.0.

For running Detekt, a new tooling API was introduced. This means that
the code that invoke Detekt can change not to use internal classes
anymore. Calling a Kotlin DSL from Java looks a little verbose, but it
still works nicely.

For tests, the Detekt YAML file was reset from the latest default, then
adapted slightly so the expected rules still get triggered. A few more
minor changes were made to match expectations with the latest version.
I also add a specific test for a new Detekt rule that has been added since
the previous version we were using here...

In terms of migration/changelong:

- Changelog of Detekt RC versions:
  https://arturbosch.github.io/detekt/changelog-rc.html

- Detekt include/exclude migration:
  https://arturbosch.github.io/detekt/howto-migratetestpattern.html

- Release notes of Detekt, since:
  https://arturbosch.github.io/detekt/changelog.html

- KtLint changelog:
  https://github.com/pinterest/ktlint/releases

Co-authored-by: Julien Lehuen <julien.lehuen@imc.com>
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.

None yet

3 participants