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

Replace getJetTypeFqName with fqNameOrNull extension #3613

Merged
merged 3 commits into from
Mar 29, 2021

Conversation

3flex
Copy link
Member

@3flex 3flex commented Mar 27, 2021

Closes #3605

This extension isn't a 1:1 replacement for getJetTypeFqName since that function has some extra logic built in to print type arguments, but that isn't used by any rules so this replacement should do the trick.

It returns the FqName instead of String like the old function did, but that might actually be more useful depending on how it's used.

I've also found the property nameIfStandardType was also imported from the js package so I've refactored to avoid its use.

@codecov
Copy link

codecov bot commented Mar 27, 2021

Codecov Report

Merging #3613 (52e0938) into main (99ca715) will decrease coverage by 0.06%.
The diff coverage is 52.17%.

❗ Current head 52e0938 differs from pull request most recent head 67bf94e. Consider uploading reports for the commit 67bf94e to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##               main    #3613      +/-   ##
============================================
- Coverage     78.22%   78.16%   -0.07%     
+ Complexity     2826     2825       -1     
============================================
  Files           466      467       +1     
  Lines          9136     9138       +2     
  Branches       1724     1731       +7     
============================================
- Hits           7147     7143       -4     
  Misses         1059     1059              
- Partials        930      936       +6     
Impacted Files Coverage Δ Complexity Δ
...lin/io/gitlab/arturbosch/detekt/rules/TypeUtils.kt 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...t/rules/coroutines/SuspendFunWithFlowReturnType.kt 66.66% <0.00%> (-4.77%) 7.00 <0.00> (ø)
...turbosch/detekt/rules/style/ForbiddenMethodCall.kt 89.18% <0.00%> (-2.71%) 14.00 <0.00> (ø)
.../arturbosch/detekt/rules/style/UseIsNullOrEmpty.kt 58.66% <0.00%> (ø) 40.00 <1.00> (ø)
...otlin/io/github/detekt/custom/SpekTestDiscovery.kt 64.28% <33.33%> (-1.17%) 11.00 <0.00> (ø)
...h/detekt/rules/bugs/DontDowncastCollectionTypes.kt 77.14% <33.33%> (-4.11%) 8.00 <0.00> (ø)
...t/rules/naming/NonBooleanPropertyPrefixedWithIs.kt 82.14% <50.00%> (-3.05%) 12.00 <0.00> (ø)
...les/style/ExplicitCollectionElementAccessMethod.kt 85.18% <71.42%> (-5.14%) 15.00 <5.00> (-1.00)
...lab/arturbosch/detekt/rules/style/ForbiddenVoid.kt 86.36% <100.00%> (+5.41%) 14.00 <1.00> (+1.00)
...detekt/rules/style/RedundantHigherOrderMapUsage.kt 73.33% <100.00%> (+1.59%) 27.00 <3.00> (-1.00) ⬆️
... and 1 more

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 99ca715...67bf94e. Read the comment docs.

3flex added 3 commits March 29, 2021 16:22
This is from the org.jetbrains.kotlin.js package which should be avoided
while detekt is limited to Kotlin/JVM analysis only.
@schalkms schalkms added this to the 1.17.0 milestone Mar 29, 2021
@schalkms schalkms merged commit 31bf79e into detekt:main Mar 29, 2021
@3flex 3flex deleted the jettype branch March 29, 2021 21:43
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.

Standardize KotlinType.getJetTypeFqName
2 participants