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

Linter for plugin documentation #10488

Closed
reimda opened this issue Jan 21, 2022 · 7 comments
Closed

Linter for plugin documentation #10488

reimda opened this issue Jan 21, 2022 · 7 comments
Assignees
Labels
feature request Requests for new plugin and for new features to existing plugins

Comments

@reimda
Copy link
Contributor

reimda commented Jan 21, 2022

Documentation of each plugin is in readme.md in the plugin folder. To make them easier to use, we try to keep the structure of the readme.md files similar for all plugins. They should always include a short description of the purpose of the plugin, a sample of its toml configuration, and a description of the plugin's metric format. They can optionally have compatibility notes and other sections.

Since many people edit the plugin docs it is hard to keep the structure similar. Let's add a linter that parses the markdown and checks that the expected sections are present. Since the sample toml config is also kept in the plugin's source code, the linter could also check that the two copies match.

There are other things a linter could do, such as check that all the toml settings that the plugin accepts are documented in the sample config.

This should also make code reviews of plugin changes more simple and help contributors of new plugins know what is required for documentation

@reimda reimda added the feature request Requests for new plugin and for new features to existing plugins label Jan 21, 2022
@reimda reimda self-assigned this Jan 21, 2022
@powersj
Copy link
Contributor

powersj commented May 12, 2022

next steps: @reimda to bring the final PR(s) home and land 'em!

@reimda
Copy link
Contributor Author

reimda commented May 25, 2022

Here's a summary of related work:

PRs merged:

PRs to be merged:

no PR yet:

  • clean up input readmes e-z

We're currently moving plugin sample configs to be in separate files (#11136 and related). Since that task also requires touching every readme, it makes sense not to do it at the same time as cleaning up the readme linter errors. Moving sample configs should be done in a few days. When it's done I'll continue cleaning up readme linter errors.

@powersj
Copy link
Contributor

powersj commented May 25, 2022

Moving sample configs should be done in a few days. When it's done I'll continue cleaning up readme linter errors.

FYI @srebhan has completed these.

@reimda
Copy link
Contributor Author

reimda commented May 27, 2022

@reimda
Copy link
Contributor Author

reimda commented Jun 8, 2022

@sspaink
Copy link
Contributor

sspaink commented Oct 26, 2022

@reimda I think this is done?

@sspaink sspaink added the waiting for response waiting for response from contributor label Oct 26, 2022
@reimda
Copy link
Contributor Author

reimda commented Oct 26, 2022

Yes it's done

@reimda reimda closed this as completed Oct 26, 2022
@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

3 participants