redefinition-end-conformance

Available in: KerML, SysML

This checks that end features are only redefined by other end features.

Specification

If the redefined_feature of a Redefinition has is_end = true and the owning_type of the redefining_feature is an Association or Connector, then the redefining_feature must have is_end = true.

Example

connection def A {
    end attribute a;
    end attribute b;
}
connection def B :> A {
    attribute a :>> a; // error: Redefining feature must be an `end` feature because it redefines an `end` feature
}

Instead, mark the redefining feature as end:

connection def A {
    end attribute a;
    end attribute b;
}
connection def B :> A {
    end attribute a :>> a; // ok
}

Or let the redefining feature implicitly redefine the inherited end feature:

connection def A {
    end attribute a;
    end attribute b;
}
connection def B :> A {
    end attribute a; // ok, implicitly redefines A::a
}

Options

  • lint.redefinition-end-conformance

    Allows restoring the old redefinition-end-conformance behaviour to diagnose end conformance for any owning type, not just Association or Connector.


All validation rules