From cad45b426f5d92cbd118741c8f11e230061ba922 Mon Sep 17 00:00:00 2001 From: Adi Mora Date: Tue, 5 Sep 2017 09:49:10 +0100 Subject: [PATCH] new release --- haxelib.json | 4 ++-- package.json | 2 +- src/checkstyle/checks/type/ReturnCheck.hx | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/haxelib.json b/haxelib.json index 7cec723f..890d088f 100644 --- a/haxelib.json +++ b/haxelib.json @@ -16,8 +16,8 @@ "contributors": [ "adireddy" ], - "releasenote": "#354", - "version": "2.1.15", + "releasenote": "added enforceReturnTypeForAnonymous option to ReturnCheck #357", + "version": "2.1.16", "url": "https://github.com/HaxeCheckstyle/haxe-checkstyle", "dependencies": { diff --git a/package.json b/package.json index 4c19724d..17b9b79d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkstyle", - "version": "2.1.15", + "version": "2.1.16", "description": "Automated code analysis ideal for projects that want to enforce a coding standard.", "repository": { "type": "git", diff --git a/src/checkstyle/checks/type/ReturnCheck.hx b/src/checkstyle/checks/type/ReturnCheck.hx index 792f58d3..b3b99134 100644 --- a/src/checkstyle/checks/type/ReturnCheck.hx +++ b/src/checkstyle/checks/type/ReturnCheck.hx @@ -108,10 +108,9 @@ class ReturnCheck extends Check { function warnReturnTypeMissing(name:String, pos:Position) { if (name == null) { - if (!enforceReturnTypeForAnonymous) { - return; + if (enforceReturnTypeForAnonymous) { + logPos("Return type not specified for anonymous method", pos); } - logPos("Return type not specified for anonymous method", pos); } else logPos('Return type not specified for method "${name}"', pos); }