-
-
Notifications
You must be signed in to change notification settings - Fork 74
Hurricup/fixes #3144
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
Hurricup/fixes #3144
Conversation
📝 WalkthroughWalkthroughThis pull request systematically migrates Java-style getter method calls to Kotlin property access across the codebase, updates copyright years to 2026, adds explicit type annotations to Gradle build configurations, updates inspection profiles to support property-access syntax, and adds suppression annotations where applicable. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35 minutes The changes are highly repetitive and consistent across 40+ files (getter method → property access refactoring), which reduces cognitive load per file. However, the scope is large and touches many critical PSI/stub serialization layers, requiring validation of correctness across the codebase. Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
plugin/common/src/main/java/com/perl5/lang/perl/parser/moose/psi/impl/PerlAttributeDefinition.kt (1)
50-55: Guard against null AST nodes when checking the ‘+’ prefix.
nameIdentifier.nodecan be null for light/stub PSI elements, which would throw atnode.chars. UsenameIdentifier.text(or a null-check onnode) to avoid NPEs.🛠️ Suggested fix
- val defaultRange = manipulator.getRangeInElement(nameIdentifier) - return if (StringUtil.startsWith(defaultRange.subSequence(nameIdentifier.node.chars), "+")) + val defaultRange = manipulator.getRangeInElement(nameIdentifier) + val nameText = nameIdentifier.text ?: return defaultRange + return if (StringUtil.startsWith(defaultRange.subSequence(nameText), "+")) TextRange.create(defaultRange.startOffset + 1, defaultRange.endOffset) else defaultRange
🧹 Nitpick comments (2)
plugin/backend/src/main/java/com/perl5/lang/perl/idea/codeInsight/typeInference/value/PerlValueBackendResolveService.kt (2)
97-100: Consider safer null handling.The
it!!assertion could throw NPE if null is passed. While IntelliJ Processor APIs typically don't pass nulls, a safer pattern would be:it?.namespaceName?.let { baseNamespaces.add(it) }Or use an early return:
if (it == null) return@Processor true baseNamespaces.add(it.namespaceName)That said, the explicit
!!makes the non-null assumption visible, which is acceptable if the API contract guarantees non-null values.
136-140: Same null-assertion pattern as above.Same consideration applies here with
it!!.callableName. The approach is consistent with line 98.
|


Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.