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

Restructuring: Clean up conditional coding in doc files #6813

Closed
1 of 4 tasks
dedemorton opened this issue Apr 9, 2018 · 2 comments
Closed
1 of 4 tasks

Restructuring: Clean up conditional coding in doc files #6813

dedemorton opened this issue Apr 9, 2018 · 2 comments

Comments

@dedemorton
Copy link
Contributor

dedemorton commented Apr 9, 2018

We need to:

  • Clean up existing conditional coding. For example, in some places, we use asciidoc attributes to render text conditionally. I haven't been very good at unsetting attributes after they are no longer needed within a book. To unset the attribute, we need to use: :attribute_name!: Once an attribute is defined within a book, it stays in scope until it's undefined. So some of the attribute definitions are redundant. Currently this doesn't affect the output, but might in the future if we move all the content to a single book.
  • Evaluate the conditional coding defined in the book. The books use a mixture of ifdef/ifndef statements and ifeval statements to conditionally render sections. The ifeval statements are based on beat names. I don't think we should be mentioning beat names in libbeat. We might want to change to use ifdef settings keyed off of attributes instead to keep the libbeat content beat-agnostic in all ways.
  • Document the conditional coding strategy because it's a bit of a tangled ball of yarn atm.
  • Make the conditional coding in libbeat Beat-agnostic...meaning that it should not refer to specific beats. Shared files in libbeat should use attributes, rather than Beat names, to set conditional sections.
@dedemorton dedemorton self-assigned this Apr 9, 2018
@dedemorton dedemorton changed the title Clean up conditional coding in doc files Restructuring: Clean up conditional coding in doc files Sep 28, 2018
@dedemorton
Copy link
Contributor Author

#8811 contains some fixes related to this issue.

@dedemorton
Copy link
Contributor Author

I'm no longer planning to make these changes in the individual Beats guides. The next generation all-in-one version of the shipper docs will not use as much conditional coding but follow cleaner principles.

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

1 participant