Skip to content

Commit

Permalink
fixes #220: Add warning for redundant "inlined" statements
Browse files Browse the repository at this point in the history
  • Loading branch information
S1artie committed Jan 25, 2019
1 parent cdd98ef commit a74388a
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import de.gebit.integrity.dsl.Parameter;
import de.gebit.integrity.dsl.ParameterTableHeader;
import de.gebit.integrity.dsl.ParameterTableValue;
import de.gebit.integrity.dsl.Suite;
import de.gebit.integrity.dsl.SuiteDefinition;
import de.gebit.integrity.dsl.SuiteParameterDefinition;
import de.gebit.integrity.dsl.SuiteReturnDefinition;
Expand Down Expand Up @@ -340,6 +341,19 @@ public void checkForPrivateConstantInSuite(ConstantDefinition anEntity) {
}
}

/**
* Checks for redundant suite inline statements.
*
* @param aSuiteStatement
*/
@Check
public void checkSuiteStatement(Suite aSuiteStatement) {
if (aSuiteStatement.getInlined() != null && aSuiteStatement.getDefinition().getInlined() != null) {
warning("Redundant inline statement: the invoked suite is already defined as 'inlined'",
DslPackage.Literals.SUITE__INLINED);
}
}

/**
* Checks for missing parameters.
*
Expand Down

0 comments on commit a74388a

Please sign in to comment.