Skip to content

Conversation

@hurricup
Copy link
Collaborator

@hurricup hurricup commented Jan 18, 2026

Summary by CodeRabbit

  • Chores
    • Updated copyright years to 2026 across multiple files.
    • Refactored code to use Kotlin properties instead of Java-style getter methods throughout the codebase.
    • Updated IDE inspection tool configurations with property access syntax adjustments.
    • Added explicit type annotations to build configuration variables.
    • Updated plugin configuration with namespace attributes.

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

@hurricup hurricup enabled auto-merge (rebase) January 18, 2026 08:51
@coderabbitai
Copy link

coderabbitai bot commented Jan 18, 2026

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Inspection configuration
.idea/inspectionProfiles/Project_Quality.xml
Removed five substring replacement inspection tools; added UsePropertyAccessSyntax inspection with non-trivial accessor reporting enabled
Gradle build configuration
build.gradle.kts, plugin/common/build.gradle.kts, tt2/common/build.gradle.kts
Added explicit type annotations (Provider<String>, Provider<Boolean>, Provider<RegularFile>, File) to top-level property declarations; updated environment function return type; changed coverallsJacoco from map to forEach
Plugin metadata
mason/framework/src/main/resources/META-INF/plugin.xml, plugin/src/main/resources/META-INF/plugin.xml
Added namespace attribute (namespace="hurricup") to content element
Mason stub serializers
mason/htmlmason/backend/src/main/java/com/perl5/lang/htmlmason/elementType/HTMLMason*.kt, mason/mason2/backend/src/main/java/com/perl5/lang/mason2/psi/impl/Mason*.kt
Migrated from getter methods to property access (e.g., getArgumentsList()argumentsList, getParentComponentPath()parentComponentPath, getName()name)
Perl stub serializers (sub/namespace/variables/globs)
plugin/backend/src/main/java/com/perl5/lang/perl/psi/stubs/*/*.kt
Systematic property access migration across multiple serializing factories: getNamespaceName()namespaceName, getSubName()subName, getCanonicalName()canonicalName, getAnnotations()annotations, isImplicit()isImplicit property; replaced setImplicit(Boolean) setter with property assignment
Perl PSI utilities and services
plugin/backend/src/main/java/com/perl5/lang/perl/**/PerlDefault*.kt, plugin/backend/src/main/java/com/perl5/lang/perl/idea/**/*.kt, plugin/backend/src/main/java/com/perl5/lang/perl/util/PerlBackendPackageService.kt
Migrated property access in namespace handlers, value resolution, host cache cleanup, and package services (e.g., getProject()project, getNamespaceName()namespaceName, getEXPORT()export)
Pod stub serializers
plugin/backend/src/main/java/com/perl5/lang/pod/elementTypes/Pod*.kt, plugin/backend/src/main/java/com/perl5/lang/pod/parser/psi/stubs/PodFileStubSerializer.kt
Replaced getter methods with property access in Pod element serialization (e.g., getPresentableText()presentableText, getTitleText()titleText, isIndexed()isIndexed); added @Suppress("unused") to deserialize parameter
Perl PSI mixins and implementations
plugin/common/src/main/java/com/perl5/lang/perl/psi/mixins/*.kt, plugin/common/src/main/java/com/perl5/lang/perl/psi/PerlNamespaceDefinitionHandler.kt, plugin/common/src/main/java/com/perl5/lang/perl/parser/moose/psi/impl/*.kt
Migrated getter methods to properties in method definitions, sub bases, and attribute definitions (e.g., getSignatureContent()signatureContent, getActualType()actualType, getNameIdentifier()nameIdentifier)
Mojo and package processor
mojo/common/src/main/java/com/perl5/lang/perl/extensions/mojo/MojoBaseProcessor.kt, plugin/backend/src/main/java/com/perl5/lang/perl/extensions/packageprocessor/impl/ParentProcessor.kt
Replaced getOptions() method calls with options property access
Test fixtures
plugin/testFixtures/src/testFixtures/java/org/jetbrains/plugins/terminal/fixture/TestShellSession.kt
Added @Suppress("removal") annotation to public class declaration

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

🐰 No more getters cluttering the way,
Properties dance in Kotlin today,
From getName() calls we're finally free,
Just .name and .project for you and me!
A refactor so clean, it makes my whiskers gleam.

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Hurricup/fixes' is vague and generic, using a branch name format rather than describing the actual changes made in the pull request. Replace with a descriptive title that summarizes the main changes, such as 'Replace getter methods with Kotlin properties across codebase' or 'Migrate Java getters to Kotlin property access patterns'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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.node can be null for light/stub PSI elements, which would throw at node.chars. Use nameIdentifier.text (or a null-check on node) 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.

@hurricup hurricup merged commit f6fd0e5 into master Jan 18, 2026
32 of 34 checks passed
@hurricup hurricup deleted the hurricup/fixes branch January 18, 2026 10:24
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 70%)

See analysis details on SonarQube Cloud

@coveralls
Copy link

Coverage Status

coverage: 75.945% (-0.05%) from 75.996%
when pulling 4088e0c on hurricup/fixes
into c09fa4a on master.

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.

3 participants