-
Notifications
You must be signed in to change notification settings - Fork 36
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
Support Ant error levels #50
Comments
I followed your suggested, trimed stuff and added error handling support. But unfortunately the source XML position cannot be emitted, because it is not part of the created SVRL |
Hmm... that's a pity. 😞 The library used in oXygen XML is able to determine the line:
So if you're stuck somewhere and just need food for thought, maybe dropping a line to them might help. They'll surely strongly appreciate your work. |
I will dig into the Locator API and see what I can do... |
The log looks much better now: |
Haha - weird side effects :) if (byte stream used) then
{
} -> if this helps as well - I'm happy :) |
Defintiely +1 on level support: would further improve the lib usage via ANT, dramatically. |
Level support is already in |
Right, I can see the error level in the logs. Alluding to the original request of making builds fail only on fatal or error. |
Thanks for the new release @phax! Log levels still do not work as expected. Schematron <?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt">
<sch:pattern>
<sch:rule context="*[contains(@class, 'topic/title')]">
<sch:report test="*[contains(@class, 'hi-d/')]" role="warning">
Do not use inline formatting in <title>
</sch:report>
</sch:rule>
</sch:pattern>
</sch:schema> This should create a
See build #31 Then the build crashes and this should not happen for warnings. |
Thanks for testing. I needed to get 5.0 out because of other dependencies - that's why I postponed this to 5.1 :( |
I was confused by the addition of the |
I looked a bit into it and I'm currently only interpreting the |
Excellent 😃 |
v5.0.2 SNAPSHOT 17 and later should do the trick: https://oss.sonatype.org/content/repositories/snapshots/com/helger/ph-schematron/5.0.2-SNAPSHOT/ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@xephon2 if you could crosscheck, it would be appreicated :) |
@phax, will try to do so. |
As the log shows, nothing has changed.
|
Thank you @xephon2 for your input.
|
Finally fixed in 5.0.11 |
Unfortunately error levels are not supported, see #16. I've changed the
<report>
level towarning
, so the build should throw a warning and no error and should not fail. Builds should fail only onfatal
orerror
.Current output
It would be nice, if the output would be one line per
<report>
/<assert>
. This would make it easier to implement a log parser/filter. I'd recommend (as a replacement for the snippet above):The text was updated successfully, but these errors were encountered: