redefinition-end-conformance
Available in: KerML, SysML
This checks that end features are only redefined by other end features.
Specification
If the
redefined_featureof aRedefinitionhasis_end = trueand theowning_typeof theredefining_featureis anAssociationorConnector, then theredefining_featuremust haveis_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-conformanceAllows restoring the old
redefinition-end-conformancebehaviour to diagnose end conformance for any owning type, not justAssociationorConnector.