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

Fix #1027 - FunctionOnlyReturningConstant #1028

Merged
merged 5 commits into from Aug 29, 2018
Merged

Fix #1027 - FunctionOnlyReturningConstant #1028

merged 5 commits into from Aug 29, 2018

Conversation

schalkms
Copy link
Member

No description provided.

@schalkms
Copy link
Member Author

@scottkennedy please have a look at this PR

@@ -52,7 +53,14 @@ class FunctionOnlyReturningConstant(config: Config = Config.empty) : Rule(config
}

private fun checkOverridableFunction(function: KtNamedFunction) =
if (ignoreOverridableFunction) !function.isOverridden() && !function.isOpen() else true
if (ignoreOverridableFunction)
!function.isOverridden() && !function.isOpen() && !checkContainingInterface(function)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets please use braces here

@arturbosch arturbosch merged commit a1cdeba into detekt:master Aug 29, 2018
@schalkms schalkms deleted the fix-#1027-FunctionOnlyReturningConstant branch September 3, 2018 18:29
@arturbosch arturbosch added this to the RC9 milestone Sep 10, 2018
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.

None yet

3 participants