-
Notifications
You must be signed in to change notification settings - Fork 146
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
Add xsl to check for negative binding indexes #2675
Conversation
@maxonfjvipon could you check this one, please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@c71n93 well done. Just a several comments from my side
<xsl:attribute name="severity"> | ||
<xsl:text>error</xsl:text> | ||
</xsl:attribute> | ||
<xsl:text>Binding index of application must not be a negative number "</xsl:text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@c71n93 I think not only negative but positive with +
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maxonfjvipon done
tests: | ||
- /program/errors[count(error[@severity='error'])=2] | ||
eo: | | ||
object c:-1 d:-2 a:0 b:1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@c71n93 let's add a case with index with +
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maxonfjvipon done
eo-parser/src/main/resources/org/eolang/parser/errors/negative-binding-indexes.xsl
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@c71n93 LGTM! Thanks
@yegor256 could you check this one, please? |
@rultor merge |
Closes #2670
PR-Codex overview
This PR focuses on adding a new XSL transformation to check if integer bindings in EO applications are negative.
Detailed summary
signed-binding-indexes.xsl
to check for negative integer bindings in EO applications.ParsingTrain.java
to include a TODO comment about checking negative int bindings via XSL.