Commit 431c9f77 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

* improved reporting for checkNoValueOfForValues

parent 8992f633
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -886,6 +886,7 @@ class CodeStyleValidator extends AbstractDeclarativeValidator {
			return
		}
		//TODO: overly specific.. 
		var target = ""
		val expr = templateOp.template.template.simple.expr
//		.ref.head
		if (expr instanceof Value) {
@@ -896,6 +897,7 @@ class CodeStyleValidator extends AbstractDeclarativeValidator {
				if (expr.ref.referencedValue instanceof FormalTemplatePar) {
					return
				}
				target = expr.ref.referencedValue.name
				//TODO: other conditions?
			} else {
				//TODO: check further?
@@ -907,7 +909,7 @@ class CodeStyleValidator extends AbstractDeclarativeValidator {
		}
		statistics.incrementCountStyle

		val message = "ValueOf operation is used on a value!"
		val message = "ValueOf operation is used on a value \""+target+"\"!"
		val INode node = NodeModelUtils.getNode(templateOp)
		warning(
			message,