We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have code like this:
private val Foo.myProperty: String = "Hello"
and the TopLevelPropertyNaming rule is configured to enforce PascalCase for top level properties:
TopLevelPropertyNaming
TopLevelPropertyNaming: active: true constantPattern: '(?:[A-Z][a-z0-9]+)(?:[A-Z]+[a-z0-9]*)*' propertyPattern: '(?:[A-Z][a-z0-9]+)(?:[A-Z]+[a-z0-9]*)*' privatePropertyPattern: '_?(?:[A-Z][a-z0-9]+)(?:[A-Z]+[a-z0-9]*)*'
I would expect Foo.myProperty to not be flagged, because this is an extension property on the Foo type, not an actual top level property.
Foo.myProperty
Foo
Detekt flags Foo.myProperty with the TopLevelPropertyNaming rule.
Configure TopLevelPropertyNaming with the above options and test against an extension property.
We are trying to enforce PascalCase naming for top level properties on our project and many of these false positives are also being flagged.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Expected Behavior
I have code like this:
and the
TopLevelPropertyNaming
rule is configured to enforce PascalCase for top level properties:I would expect
Foo.myProperty
to not be flagged, because this is an extension property on theFoo
type, not an actual top level property.Observed Behavior
Detekt flags
Foo.myProperty
with theTopLevelPropertyNaming
rule.Steps to Reproduce
Configure
TopLevelPropertyNaming
with the above options and test against an extension property.Context
We are trying to enforce PascalCase naming for top level properties on our project and many of these false positives are also being flagged.
Your Environment
The text was updated successfully, but these errors were encountered: