Skip to content

bug(#268): allow vertical-bound-method in application-duality#280

Merged
yegor256 merged 5 commits intoobjectionary:masterfrom
h1alexbel:268-false-alarm
Jan 28, 2025
Merged

bug(#268): allow vertical-bound-method in application-duality#280
yegor256 merged 5 commits intoobjectionary:masterfrom
h1alexbel:268-false-alarm

Conversation

@h1alexbel
Copy link
Member

In this PR I've updated application-duality lint to handle @as references in vertical and horizontal method bounds.

see #268
History:

@h1alexbel h1alexbel changed the title bug(#268): allow vertical-bound-method in application-duality bug(#268): allow vertical-bound-method in application-duality Jan 26, 2025
@h1alexbel
Copy link
Member Author

@maxonfjvipon please check this one. I'm not sure if my fix is right. Would like to hear your feedback

<xsl:if test="count(o) != count(o[@as]) and count(o) != count(o[not(@as)])">
<xsl:variable name="violates" as="xs:boolean">
<xsl:choose>
<xsl:when test="starts-with(@base, '.')">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@h1alexbel let's simplify all of this with something like:

<xsl:variable name="args">
  <xsl:choose>
    <xsl:when test="starts-with(@base, '.')">
      <xsl:value-of select="o[position()&gt;1]"/>
    </xsl:when>
    <xsl:otherwise>
      <xsl:value-of select="o"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:variable>
<xsl:if test="count($args) != count($args[@as]) and count($args) != count($args[not(@as)])"/>

@h1alexbel
Copy link
Member Author

@maxonfjvipon updated. Take a look, please

@h1alexbel
Copy link
Member Author

@yegor256 take a look, please

@yegor256 yegor256 merged commit ce59ac1 into objectionary:master Jan 28, 2025
15 checks passed
@yegor256
Copy link
Member

@h1alexbel thanks!

@h1alexbel h1alexbel deleted the 268-false-alarm branch January 28, 2025 19:37
@0crat
Copy link

0crat commented Jan 30, 2025

@maxonfjvipon Thanks for the review! Here's your reward breakdown: +4 base points, -24 for self-review, +1.6 for 160 hits-of-code, -10 for only 5 comments, +1.25 for those comments. Total: 4 points (min. reward). Your balance is now +27. Keep up the good work and aim for more comments next time! 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants