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

Ant: Add new failure controller attribute #66

Closed
stefan-jung opened this issue Mar 23, 2018 · 9 comments
Closed

Ant: Add new failure controller attribute #66

stefan-jung opened this issue Mar 23, 2018 · 9 comments
Assignees
Milestone

Comments

@stefan-jung
Copy link

I like to break the build for some error levels, not for all. The failOnError is boolean, so cannot be used to do this. What I'd like to have is something like this:

failOnRole="fatal,error,warning"
@phax
Copy link
Owner

phax commented Mar 23, 2018

fyi: currently there is a heuristics contained that takes into consideration:

  • for fatal error: fatal, fatalerror, fatal_error, fatal-error (since 5.0.2)
  • for error: error, err
  • for warning: warning, warn
  • for information (since 5.0.2): information, info, notice, note.

phax added a commit that referenced this issue Apr 12, 2018
@phax
Copy link
Owner

phax commented Apr 12, 2018

I did it slightly different. There is a list of errorRole elements that define additional role and flag values that are interpreted as error. E.g.

      <errorRole role="foo" />
      <errorRole role="bar" />

These error roles are handle with precendence, but if not contained, it falls back to the default error levels as stated above.

@phax phax added this to the v5.0.2 milestone Apr 12, 2018
@phax phax closed this as completed Apr 12, 2018
@fviolette
Copy link

Do you confirm <report>s are properly handled according to the errorRole(s) defined?

With failOnError set to true and <errorRole role="fatal"/>, my test chokes on the first <report test="." role="info">...</report>.

It is properly ignored when turning it into <assert test="not(.)" role="info">...</assert>.

phax added a commit that referenced this issue Aug 13, 2018
@phax
Copy link
Owner

phax commented Aug 13, 2018

@fviolette I added a second unit test for this issue with "report" elements. And to me it looks fine.
But there is an incosnstency in your test: "errorRole" uses "fatal", the "report" uses "info" - was that accidental?

@fviolette
Copy link

fviolette commented Aug 13, 2018

I meant the report role="info" returned an error, which I did not expect by setting . Did I misunderstand anything?

I am going to check your unit test and double check my issues.

phax added a commit that referenced this issue Aug 13, 2018
@phax
Copy link
Owner

phax commented Aug 13, 2018

Thanks all. Found it. Sorry - copy paste error for reports only :( Will do 5.0.5 asap

@fviolette
Copy link

You seriously rule!

@fviolette
Copy link

All good now.

@phax
Copy link
Owner

phax commented Aug 13, 2018

Excellent - thanks for rechecking!

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

No branches or pull requests

3 participants