Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prohibit named objects on the > 1 level from abstract object #291

Open
maxonfjvipon opened this issue Jan 31, 2025 · 0 comments
Open

prohibit named objects on the > 1 level from abstract object #291

maxonfjvipon opened this issue Jan 31, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@maxonfjvipon
Copy link
Member

maxonfjvipon commented Jan 31, 2025

This is EO code with syntax sugar:

[] > foo
  x > @
    y > a
      z > b

The canonical form of such code:

[] > foo
  z > b
  y $.b > a
  x $.a > @

The same structure will be in XMIR. With sugar:

<objects>
  <o base="x" name="@">
    <o base="y" name="a">
      <o base="z" name="b"/>
    </o>
  </o>
</objects>

The canonical:

<objects>
  <o base="x" name="@">
    <o base="$.a"/>
  </o>
  <o base="y" name="a">
    <o base="$.b"/>
  </o>
  <o base="z" name="b"/>
</objects>

The key point - only the FIRST-level children of abstract object (or <objects/> element) may have @name attribute, any @name attributes found deeper must be prohibited

The severity level is critical

@maxonfjvipon maxonfjvipon changed the title Implement all unnecessary lints for canonical XMIR prohibit named objects on the > 1 level from abstract object Jan 31, 2025
@maxonfjvipon maxonfjvipon added the bug Something isn't working label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant