Skip to content

[Feature]: AST coverage gaps blocking strict-by-default lint #137

Closed

Description

@Malcolmnixon

Problem Statement

After #129 (name-resolver stages 1–3), 48 strict-mode unresolved-reference errors remain on the 251-file OMG example corpus (18 files). None of them are name-resolver bugs: the AST does not capture the referenced model elements. This blocks making --strict-unresolved the default.

Causes, with counts and examples:

  • 26: nested action, calc and constraint bodies are not built into the AST, e.g. producer_2.producerBehavior.publish.sentMessage.
  • 7: bare directed usages (in x; without a keyword) build no AST node, e.g. shoot.picture. See also the PR-L known limitation and [Feature]: Action Flow View: parameters, swimlanes, flows, nested actions, control structures #103.
  • 5: timeslice and snapshot usages are not modeled, e.g. vehicle1_t0.
  • 3: multiple redefinitions (part :>> a :>> b): only the first is recorded.
  • 2: an anonymous owner (elements).
  • 2: #service def (metadata-defined keyword usages) is not modeled.
  • 3: a name collision in the corpus itself (part def Camera vs package Camera); investigate whether this is a genuine model error.

Proposed Solution

Extend AstBuilder to build nodes for these constructs, with tests, and lower the corpus ratchet. Once it is about 10 or fewer, with each remaining case explained, flip the --strict-unresolved default (#123/#130).

Priority

Medium - Would improve my workflow

Willingness to Contribute

Yes, I can submit a pull request

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions