package edu.kit.iti.formal.pse.worthwhile.validation;


public class WorthwhileJavaValidator extends AbstractWorthwhileJavaValidator {

//	@Check
//	public void checkGreetingStartsWithCapital(Greeting greeting) {
//		if (!Character.isUpperCase(greeting.getName().charAt(0))) {
//			warning("Name should start with a capital", MyDslPackage.Literals.GREETING__NAME);
//		}
//	}

}

@@ -48,16 +48,315 @@
 ation;%0A%0A
+import org.apache.tools.ant.taskdefs.optional.testing.Funtest;%0Aimport org.eclipse.emf.ecore.EObject;%0Aimport org.eclipse.xtext.validation.Check;%0A%0Aimport com.google.inject.Inject;%0A%0Aimport de.itemis.xtext.typesystem.ITypesystem;%0Aimport edu.kit.iti.formal.pse.worthwhile.model.ast.FunctionDeclaration;%0A%0A
 %0Apublic 
@@ -668,11 +668,521 @@
 %09%7D%0A//%09%7D%0A
+%09%0A%09%0A%09@Check%0A%09public void checkFunctionDeclerationValidReturnStatment(FunctionDeclaration functionDeclaration) %7B%0A%09%09ValidatorASTNodeVisitor validatorASTNodeVisitor = new ValidatorASTNodeVisitor();%0A%09%09validatorASTNodeVisitor.visit(functionDeclaration);%0A%09%09if(!validatorASTNodeVisitor.getValidReturnFound()) %7B%0A%09%09%09error(%22Function has no valid return statement.%22, null);%0A%09%09%7D%0A%09%7D%0A%09@Inject%0A%09private ITypesystem ts;%0A%09%0A%09@Check%0A%09public void checkTypesystemRules( EObject x ) %7B%0A%09  ts.checkTypesystemConstraints(x, this);%0A%09%7D%0A%0A
 %0A%7D%0A

Add check for valid return statements.