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

Some Warning in ASCIIDOCTOR #3482

Closed
hhlp opened this issue Nov 13, 2019 · 5 comments
Closed

Some Warning in ASCIIDOCTOR #3482

hhlp opened this issue Nov 13, 2019 · 5 comments
Milestone

Comments

@hhlp
Copy link

hhlp commented Nov 13, 2019

I've had a fun of Question about this warning?

  • What is this mean?
  • How Can I know, What file is content the warning?
  • How to trace it? I'm under container

asciidoctor: WARNING: skipping reference to missing attribute: majorosver
asciidoctor: WARNING: skipping reference to missing attribute: context

NOTE: I've had a bunch of files....

Regards.,

@ggrossetie
Copy link
Member

Hello @hhlp

It means that majorosver and context attributes are undefined. You most likely have a reference in your files {majorosver} and {context}. Since the processor can't replace the reference with the actual value, it issues a warning.

Please note that you can configure the behavior when the processor finds a reference to a missing attribute: https://asciidoctor.org/docs/user-manual/#handle-missing-or-undefined-attributes

I hope it helps 😃

@ggrossetie
Copy link
Member

How can I know, What file is content the warning?

In theory, we could add the source location on the log but it's really useful? I mean, you can already find every occurrences of the attribute using grep (or something similar).
In this case, I think what you want to know is why the attribute named majorosver is undefined but unfortunately the processor can't help you with that.

@ggrossetie
Copy link
Member

How to trace it? I'm under container

I would try to find if :majorosver: is present somewhere. Maybe you are using a file where all the attributes are defined but this file is not included?

attributes.adoc

:majorosver: 1.2.3

document.adoc

Please use {majorosver}

Since attributes.adoc is not included in document.adoc, majorosver is undefined.
And here's how to fix this issue:

attributes.adoc

:majorosver: 1.2.3

document.adoc

include::attributes.adoc[]

Please use {majorosver}

@mojavelinux mojavelinux added this to the support milestone Nov 16, 2019
@mojavelinux
Copy link
Member

And btw, these warnings are opt in. The fact that you are getting them indicates that you have attribute-missing=warn set (or you are using Antora, which enables that setting by default).

@hhlp
Copy link
Author

hhlp commented Nov 16, 2019

thx for point me out in the right direction

regards

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

No branches or pull requests

3 participants