From ce9e6fd6f987bc147095bd061517574451234924 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Sat, 3 Dec 2016 19:42:27 +0100 Subject: [PATCH] disable codeclimate complaining about else statements encouraging early return is good, but this check complains about every single else statement in the code. see https://github.com/yiisoft/yii2/pull/13126#issuecomment-264653343 --- .codeclimate.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.codeclimate.yml b/.codeclimate.yml index d8166d7..2debb0d 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -14,6 +14,10 @@ engines: enabled: true # configure checks, see https://phpmd.org/rules/index.html for details checks: + # else is not always bad. Disabling this as there is no reason to differentiate + # between early return and normal else cases. + CleanCode/ElseExpression: + enabled: false # Static access on Yii::$app is normal in Yii CleanCode/StaticAccess: enabled: false