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

make exception to function-naming rule for override #2271

Closed
diasDominik opened this issue Sep 21, 2023 · 1 comment · Fixed by #2274
Closed

make exception to function-naming rule for override #2271

diasDominik opened this issue Sep 21, 2023 · 1 comment · Fixed by #2274

Comments

@diasDominik
Copy link

Expected Behavior

for override functions the function-naming rule should not apply as it is possible that you don't have control over the naming of that function as you override it from e.g. external lib.
override fun Foo() does not trigger the function naming rule

Current Behavior

override fun Foo() does trigger the function naming rule

Additional information

  • Current version of ktlint: 1.0.0
@paul-dingemans
Copy link
Collaborator

Good suggestion. Tnx

@paul-dingemans paul-dingemans added this to the 1.0.1 milestone Sep 23, 2023
@paul-dingemans paul-dingemans self-assigned this Sep 23, 2023
paul-dingemans added a commit that referenced this issue Sep 23, 2023
A function override should not be reported as the interface of class that defines the function might be out of scope of the project in which case the function name can not be changed. Note that the function will still be reported at the interface or class itself whenever that interface or class is defined inside the scope of the project.

Closes #2271
paul-dingemans added a commit that referenced this issue Sep 23, 2023
A function override should not be reported as the interface of class that defines the function might be out of scope of the project in which case the function name can not be changed. Note that the function will still be reported at the interface or class itself whenever that interface or class is defined inside the scope of the project.

Closes #2271
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants