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

[bugfix] fn:matches error codes #4886

Merged
merged 5 commits into from
May 8, 2023

Conversation

line-o
Copy link
Member

@line-o line-o commented Apr 26, 2023

Description:

Read the error code raised by the Saxon regular expression implementation.
This will now correctly raise FORX0002 when the pattern is invalid.

Reference:

https://www.w3.org/TR/xpath-functions-31/#func-matches

Type of tests:

added XQSuite tests

Read the error code raised by the Saxon regular expression
implementation.
This will now correctly raise FORX0002 when the pattern is
invalid.
@line-o line-o requested a review from a team April 26, 2023 15:13
@line-o
Copy link
Member Author

line-o commented Apr 26, 2023

XQTS results are in:

failures="-307"

Astounding what one can achieve with the smallest of changes.

@line-o
Copy link
Member Author

line-o commented Apr 26, 2023

I would really love to see the percentage of passing tests in the XQTS results.
To save you time I calculated it:

before after
79,759% 80,726%

- use enhanced switch for readability
- add general error code to default case
@line-o
Copy link
Member Author

line-o commented Apr 26, 2023

now an additional two XQTS tests pass ... 👀

Copy link
Contributor

@duncdrum duncdrum left a comment

Choose a reason for hiding this comment

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

Nice one again. Could you add one valid pattern to the two test functions for prosperities sake?

Copy link
Member

@adamretter adamretter left a comment

Choose a reason for hiding this comment

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

LGTM.

@line-o line-o requested a review from a team April 27, 2023 13:20
@sonarcloud
Copy link

sonarcloud bot commented Apr 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

43.8% 43.8% Coverage
0.0% 0.0% Duplication

@joewiz
Copy link
Member

joewiz commented May 8, 2023

With two approvals from core devs, this can be merged. Thanks @line-o and thanks @adamretter and @dizzzz!

@joewiz joewiz merged commit 83086c3 into eXist-db:develop May 8, 2023
10 of 12 checks passed
@line-o line-o deleted the fix/matches-error-code branch July 21, 2023 10:18
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.

None yet

5 participants