Loading de.ugoe.cs.swe.T3Q/T3Q.launch +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ </listAttribute> <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="de.ugoe.cs.swe.T3Q.T3Q"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--config config/t3q.cfg --profile defaultProfile resources/IMS_PART4_IWD_14wk37"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--config config/t3q.cfg --profile defaultProfile resources/IMS_PART4_IWD_15wk38"/> <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="de.ugoe.cs.swe.T3Q"/> <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms256m -Xmx4g"/> <stringAttribute key="yk-options" value=" additional-options2=onexit\=snapshot "/> Loading de.ugoe.cs.swe.T3Q/build/t3q.cfg +5 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,11 @@ <checkNoUnusedImports>true</checkNoUnusedImports> <checkNoUnusedFormalParameters>true</checkNoUnusedFormalParameters> <checkNoUnusedLocalDefinitions>true</checkNoUnusedLocalDefinitions> <checkNoLiterals>true</checkNoLiterals> <checkNoLiterals>false</checkNoLiterals> <checkLevelOfNestedCalls>true</checkLevelOfNestedCalls> <maxLevelOfNestedCalls>4</maxLevelOfNestedCalls> <checkInlineTemplates>false</checkInlineTemplates> <checkListedVariableDeclarations>true</checkListedVariableDeclarations> <checkTypesAndValuesModuleContainmentCheck>true</checkTypesAndValuesModuleContainmentCheck> <checkTemplatesModuleContainmentCheck>true</checkTemplatesModuleContainmentCheck> <checkFunctionsModuleContainmentCheck>true</checkFunctionsModuleContainmentCheck> Loading de.ugoe.cs.swe.T3Q/config/t3q.cfg +4 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,10 @@ <checkNoUnusedFormalParameters>true</checkNoUnusedFormalParameters> <checkNoUnusedLocalDefinitions>true</checkNoUnusedLocalDefinitions> <checkNoLiterals>false</checkNoLiterals> <checkLevelOfNestedCalls>true</checkLevelOfNestedCalls> <maxLevelOfNestedCalls>4</maxLevelOfNestedCalls> <checkInlineTemplates>false</checkInlineTemplates> <checkListedVariableDeclarations>true</checkListedVariableDeclarations> <checkTypesAndValuesModuleContainmentCheck>true</checkTypesAndValuesModuleContainmentCheck> <checkTemplatesModuleContainmentCheck>true</checkTemplatesModuleContainmentCheck> <checkFunctionsModuleContainmentCheck>true</checkFunctionsModuleContainmentCheck> Loading de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/validation/CodeStyleValidator.xtend +13 −6 Original line number Diff line number Diff line Loading @@ -160,9 +160,11 @@ class CodeStyleValidator extends AbstractDeclarativeValidator { } @Check def checkNestedCalls(FunctionInstance instance) { // TODO: configuration for check and number of allowed nested calls val maxLevel = 3; def checkLevelOfNestedCalls(FunctionInstance instance) { if (!activeProfile.checkLevelOfNestedCalls) return; val maxLevel = activeProfile.maxLevelOfNestedCalls; var depth = 1; var parent = instance; Loading Loading @@ -191,7 +193,9 @@ class CodeStyleValidator extends AbstractDeclarativeValidator { @Check def checkListedVariableDeclarations(TempVarList list) { // TODO: configuration for check if (!activeProfile.checkListedVariableDeclarations) return; if (list.variables.size > 1) { statistics.incrementCountStyle val message = "Listed variable declarations are used!" Loading @@ -209,7 +213,9 @@ class CodeStyleValidator extends AbstractDeclarativeValidator { @Check def checkListedVariableDeclarations(VarList list) { // TODO: configuration for check if (!activeProfile.checkListedVariableDeclarations) return; if (list.variables.size > 1) { statistics.incrementCountStyle val message = "Listed variable declarations are used!" Loading @@ -228,7 +234,8 @@ class CodeStyleValidator extends AbstractDeclarativeValidator { @Check def checkInlineTemplates() { //TODO: implement this //TODO: configuration for this check if (!activeProfile.checkInlineTemplates) return; } private def <T extends EObject> int nestingDepth(EObject o, Class<T> t) { Loading de.ugoe.cs.swe.TTCN3Configuration/src/de/ugoe/cs/swe/TTCN3Configuration/QualityCheckProfile.java +45 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,10 @@ public class QualityCheckProfile extends ConfigurationProfile { private boolean checkNoUnusedFormalParameters = true; private boolean checkNoUnusedLocalDefinitions = true; private boolean checkNoLiterals = true; private boolean checkLevelOfNestedCalls = true; private int maxLevelOfNestedCalls = 4; private boolean checkInlineTemplates = false; private boolean checkListedVariableDeclarations = true; private boolean checkTypesAndValuesModuleContainmentCheck = true; private boolean checkTemplatesModuleContainmentCheck = true; Loading Loading @@ -532,5 +535,46 @@ public class QualityCheckProfile extends ConfigurationProfile { return recursionInCheckNoOverSpecificRunsOnClauses; } public boolean isCheckLevelOfNestedCalls() { return checkLevelOfNestedCalls; } public void setCheckLevelOfNestedCalls(boolean checkLevelOfNestedCalls) { this.checkLevelOfNestedCalls = checkLevelOfNestedCalls; } public int getMaxLevelOfNestedCalls() { return maxLevelOfNestedCalls; } public void setMaxLevelOfNestedCalls(int maxLevelOfNestedCalls) { this.maxLevelOfNestedCalls = maxLevelOfNestedCalls; } public boolean isCheckInlineTemplates() { return checkInlineTemplates; } public void setCheckInlineTemplates(boolean checkInlineTemplates) { this.checkInlineTemplates = checkInlineTemplates; } public boolean isCheckListedVariableDeclarations() { return checkListedVariableDeclarations; } public void setCheckListedVariableDeclarations(boolean checkListedVariableDeclarations) { this.checkListedVariableDeclarations = checkListedVariableDeclarations; } public void setCheckTypesAndValuesModuleImportsLibNames(boolean checkTypesAndValuesModuleImportsLibNames) { this.checkTypesAndValuesModuleImportsLibNames = checkTypesAndValuesModuleImportsLibNames; } public void setTypesAndValuesImportsLibNamesRegExp(String typesAndValuesImportsLibNamesRegExp) { this.typesAndValuesImportsLibNamesRegExp = typesAndValuesImportsLibNamesRegExp; } } Loading
de.ugoe.cs.swe.T3Q/T3Q.launch +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ </listAttribute> <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="de.ugoe.cs.swe.T3Q.T3Q"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--config config/t3q.cfg --profile defaultProfile resources/IMS_PART4_IWD_14wk37"/> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--config config/t3q.cfg --profile defaultProfile resources/IMS_PART4_IWD_15wk38"/> <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="de.ugoe.cs.swe.T3Q"/> <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms256m -Xmx4g"/> <stringAttribute key="yk-options" value=" additional-options2=onexit\=snapshot "/> Loading
de.ugoe.cs.swe.T3Q/build/t3q.cfg +5 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,11 @@ <checkNoUnusedImports>true</checkNoUnusedImports> <checkNoUnusedFormalParameters>true</checkNoUnusedFormalParameters> <checkNoUnusedLocalDefinitions>true</checkNoUnusedLocalDefinitions> <checkNoLiterals>true</checkNoLiterals> <checkNoLiterals>false</checkNoLiterals> <checkLevelOfNestedCalls>true</checkLevelOfNestedCalls> <maxLevelOfNestedCalls>4</maxLevelOfNestedCalls> <checkInlineTemplates>false</checkInlineTemplates> <checkListedVariableDeclarations>true</checkListedVariableDeclarations> <checkTypesAndValuesModuleContainmentCheck>true</checkTypesAndValuesModuleContainmentCheck> <checkTemplatesModuleContainmentCheck>true</checkTemplatesModuleContainmentCheck> <checkFunctionsModuleContainmentCheck>true</checkFunctionsModuleContainmentCheck> Loading
de.ugoe.cs.swe.T3Q/config/t3q.cfg +4 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,10 @@ <checkNoUnusedFormalParameters>true</checkNoUnusedFormalParameters> <checkNoUnusedLocalDefinitions>true</checkNoUnusedLocalDefinitions> <checkNoLiterals>false</checkNoLiterals> <checkLevelOfNestedCalls>true</checkLevelOfNestedCalls> <maxLevelOfNestedCalls>4</maxLevelOfNestedCalls> <checkInlineTemplates>false</checkInlineTemplates> <checkListedVariableDeclarations>true</checkListedVariableDeclarations> <checkTypesAndValuesModuleContainmentCheck>true</checkTypesAndValuesModuleContainmentCheck> <checkTemplatesModuleContainmentCheck>true</checkTemplatesModuleContainmentCheck> <checkFunctionsModuleContainmentCheck>true</checkFunctionsModuleContainmentCheck> Loading
de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/validation/CodeStyleValidator.xtend +13 −6 Original line number Diff line number Diff line Loading @@ -160,9 +160,11 @@ class CodeStyleValidator extends AbstractDeclarativeValidator { } @Check def checkNestedCalls(FunctionInstance instance) { // TODO: configuration for check and number of allowed nested calls val maxLevel = 3; def checkLevelOfNestedCalls(FunctionInstance instance) { if (!activeProfile.checkLevelOfNestedCalls) return; val maxLevel = activeProfile.maxLevelOfNestedCalls; var depth = 1; var parent = instance; Loading Loading @@ -191,7 +193,9 @@ class CodeStyleValidator extends AbstractDeclarativeValidator { @Check def checkListedVariableDeclarations(TempVarList list) { // TODO: configuration for check if (!activeProfile.checkListedVariableDeclarations) return; if (list.variables.size > 1) { statistics.incrementCountStyle val message = "Listed variable declarations are used!" Loading @@ -209,7 +213,9 @@ class CodeStyleValidator extends AbstractDeclarativeValidator { @Check def checkListedVariableDeclarations(VarList list) { // TODO: configuration for check if (!activeProfile.checkListedVariableDeclarations) return; if (list.variables.size > 1) { statistics.incrementCountStyle val message = "Listed variable declarations are used!" Loading @@ -228,7 +234,8 @@ class CodeStyleValidator extends AbstractDeclarativeValidator { @Check def checkInlineTemplates() { //TODO: implement this //TODO: configuration for this check if (!activeProfile.checkInlineTemplates) return; } private def <T extends EObject> int nestingDepth(EObject o, Class<T> t) { Loading
de.ugoe.cs.swe.TTCN3Configuration/src/de/ugoe/cs/swe/TTCN3Configuration/QualityCheckProfile.java +45 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,10 @@ public class QualityCheckProfile extends ConfigurationProfile { private boolean checkNoUnusedFormalParameters = true; private boolean checkNoUnusedLocalDefinitions = true; private boolean checkNoLiterals = true; private boolean checkLevelOfNestedCalls = true; private int maxLevelOfNestedCalls = 4; private boolean checkInlineTemplates = false; private boolean checkListedVariableDeclarations = true; private boolean checkTypesAndValuesModuleContainmentCheck = true; private boolean checkTemplatesModuleContainmentCheck = true; Loading Loading @@ -532,5 +535,46 @@ public class QualityCheckProfile extends ConfigurationProfile { return recursionInCheckNoOverSpecificRunsOnClauses; } public boolean isCheckLevelOfNestedCalls() { return checkLevelOfNestedCalls; } public void setCheckLevelOfNestedCalls(boolean checkLevelOfNestedCalls) { this.checkLevelOfNestedCalls = checkLevelOfNestedCalls; } public int getMaxLevelOfNestedCalls() { return maxLevelOfNestedCalls; } public void setMaxLevelOfNestedCalls(int maxLevelOfNestedCalls) { this.maxLevelOfNestedCalls = maxLevelOfNestedCalls; } public boolean isCheckInlineTemplates() { return checkInlineTemplates; } public void setCheckInlineTemplates(boolean checkInlineTemplates) { this.checkInlineTemplates = checkInlineTemplates; } public boolean isCheckListedVariableDeclarations() { return checkListedVariableDeclarations; } public void setCheckListedVariableDeclarations(boolean checkListedVariableDeclarations) { this.checkListedVariableDeclarations = checkListedVariableDeclarations; } public void setCheckTypesAndValuesModuleImportsLibNames(boolean checkTypesAndValuesModuleImportsLibNames) { this.checkTypesAndValuesModuleImportsLibNames = checkTypesAndValuesModuleImportsLibNames; } public void setTypesAndValuesImportsLibNamesRegExp(String typesAndValuesImportsLibNamesRegExp) { this.typesAndValuesImportsLibNamesRegExp = typesAndValuesImportsLibNamesRegExp; } }