Skip to content

configurationPropertiesPrefixKebabCase: false positive when prefix is a direct const val reference #5

@yluom

Description

@yluom

Follow-up to #3.

configurationPropertiesPrefixKebabCase still triggers when the prefix argument is a direct reference to a const val, rather than a string template.

Repro

const val MY_PREFIX = "my-app"

@ConfigurationProperties(prefix = MY_PREFIX)
data class MyProperties(/* ... */)

Expected

No violation — MY_PREFIX resolves to "my-app", valid lowercase kebab-case.

Actual

configurationPropertiesPrefixKebabCase: @ConfigurationProperties prefix should use lowercase kebab-case segments: MyProperties has prefix 'MY_PREFIX'

The rule reports the identifier name (MY_PREFIX) rather than resolving it to the underlying string value.

Version

dev.protsenko:spring-boot-code-guard:1.0.9

Notes

#3 fixed the string-template case (e.g. "${MY_PREFIX}.suffix"), but the direct-reference case (prefix = MY_PREFIX) appears to remain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions