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 inner inner objects with @base attributes if it can be merged with its parent #293

Open
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

In EO 0.51.0 we introduced roll-bases.xsl that reduced amount of nested objects and merges their @base attributes if it's possible.
Let's make a lint that checks if all possible bases are merged.

Imagine we have two objects:

<o base="X">
  <o base="Y"/>
</o>

If they are merged we get <o base="YX"/>.

We can't merge them if:

  1. X does not start with . (dot)
  2. X starts with . and Y starts with .
  3. Y has inner object Z that can't be merged with Y (apply all the rules for Y-Z pair)
<o base="X">
  <o base="Y">
    <o base="Z"/>
  </o>
</o>
  1. Y has more than 1 any inner objects
  2. Y has data (not empty text())
  3. Y is an abstract object

For more details see the roll-bases.xsl itself

The severity level is warning (temporary)

@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