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

SONARKT-552 Migrate DelegationPatternCheck to kotlin-analysis-api #566

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Godin
Copy link
Member

@Godin Godin commented Feb 11, 2025

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod bot changed the title Migrate DelegationPatternCheck to kotlin-analysis-api SONARKT-552 Migrate DelegationPatternCheck to kotlin-analysis-api Feb 11, 2025
@Godin Godin force-pushed the godin/DelegationPatternCheck branch from 8c5daba to 4aed8c2 Compare February 14, 2025 09:22
@@ -1,6 +1,6 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Issues disappeared from the Kotlin compiler are related to the fact, that we only pass Kotlin files to the analysis and don't provide classpath.

The issues disappear because for some parameters we can't resolve types (receive KaErrorType) and that's why we can't guarantee that there was a match of method signatures. The types that are unresolved are represented by classes written in Java (for example KtExpression).

So far I think we can accept this change as this is related to the analysis misconfiguration and not the rule behavior.

Copy link
Contributor

@leveretka leveretka Feb 14, 2025

Choose a reason for hiding this comment

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

Previously an empty String was returned as a fully qualified name of an Error type. Since "" is equal to "", the issue appeared by accident and by accident those issues happened to be TP.

Before we introduced generation of Binding context in all cases, these issues weren't triggered as types weren't resolved at all.

@Godin Godin force-pushed the godin/DelegationPatternCheck branch from a6adc77 to 4b4f1d4 Compare February 21, 2025 11:10
@Godin Godin force-pushed the godin/DelegationPatternCheck branch 2 times, most recently from e4826d9 to b72997e Compare February 21, 2025 14:20
@Godin Godin force-pushed the godin/DelegationPatternCheck branch from b72997e to 6190bad Compare February 21, 2025 14:23
@Godin Godin marked this pull request as ready for review February 21, 2025 18:33
@Godin Godin requested a review from leveretka February 21, 2025 18:33
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