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

Add an option to configure the failure level and fail the task accordingly #536

Closed
ggrossetie opened this issue Mar 12, 2020 · 3 comments
Closed
Labels
3.x Issues related to the 3.x
Milestone

Comments

@ggrossetie
Copy link
Member

ggrossetie commented Mar 12, 2020

Asciidoctor can return a non-zero exit code if specified logging level is reached. For instance, it can be useful when you want to fail if an include directive is not found (by setting failure_level to WARN).

In the context of Gradle, I think we should probably throw an exception to fail the task.

I can submit a pull request with a few guidance on how to (properly) fail task.

ggrossetie added a commit to ggrossetie/asciidoctor-gradle-plugin that referenced this issue Mar 23, 2020
ggrossetie added a commit to ggrossetie/asciidoctor-gradle-plugin that referenced this issue Mar 23, 2020
ggrossetie added a commit to ggrossetie/asciidoctor-gradle-plugin that referenced this issue Mar 23, 2020
ggrossetie added a commit to ggrossetie/asciidoctor-gradle-plugin that referenced this issue Mar 23, 2020
ggrossetie added a commit to ggrossetie/asciidoctor-gradle-plugin that referenced this issue Mar 23, 2020
ggrossetie added a commit to ggrossetie/asciidoctor-gradle-plugin that referenced this issue Mar 23, 2020
ggrossetie added a commit to ggrossetie/asciidoctor-gradle-plugin that referenced this issue Mar 24, 2020
ggrossetie added a commit to ggrossetie/asciidoctor-gradle-plugin that referenced this issue Mar 24, 2020
ysb33r added a commit that referenced this issue Mar 29, 2020
resolves #536 configure the failure level and fail the task accordingly
@ysb33r ysb33r added the 3.x Issues related to the 3.x label Mar 30, 2020
@ysb33r
Copy link
Member

ysb33r commented Mar 30, 2020

Closed. Will be in 3.2.0

@ysb33r ysb33r closed this as completed Mar 30, 2020
@ysb33r ysb33r added this to the 3.2.0 milestone Mar 30, 2020
ysb33r pushed a commit to ysb33r/asciidoctor-gradle-plugin that referenced this issue Apr 11, 2020
@ysb33r ysb33r mentioned this issue Apr 12, 2020
@abelsromero
Copy link
Member

Trying to test this I see this only works in tasks with

asciidoctor {
    failureLevel 'ERROR'
}

But failureLevel is not valid in the extension

asciidoctorj {
}

Is that intended?

@ysb33r
Copy link
Member

ysb33r commented Jul 6, 2021

asciidoctor {
  asciidoctorj {
    failureLevel 'ERROR'
 }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issues related to the 3.x
Projects
None yet
Development

No branches or pull requests

3 participants