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

Issue a warning for examples without title #290

Open
bastelfreak opened this issue Oct 20, 2021 · 1 comment
Open

Issue a warning for examples without title #290

bastelfreak opened this issue Oct 20, 2021 · 1 comment

Comments

@bastelfreak
Copy link
Collaborator

Use Case

puppet-strings supports examples likes:

# @example this is the title
#   insert puppet code here
#

puppet-strings ignores missing titles and will then add a bunch of #### into the REFERENCE.md.

Describe the Solution You Would Like

It would be nice if puppet-strings could issue a warning/error if the title for an example is missing and if that could be used in a rake task to validate the puppet files.

Describe Alternatives You've Considered

This is based on https://github.com/voxpupuli/puppet-lint-param-docs/ but I think it would make more sense to have this feature within puppet-strings

Additional Context

Add any other context or screenshots about the feature request here.

@genebean
Copy link

genebean commented Nov 4, 2021

It sure would be nice for puppet-strings to be able to be told to fail for warnings (similar to how puppet-lint can be configured) and for undocumented bits. We are currently having to work around the limitations of puppet-strings with this in a GitHub Action:

set -e
documentation=$(pdk bundle exec puppet strings generate --format markdown)
if [ $(echo $documentation | grep -Ec "[1-9]+ undocumented|\[warn\]") -gt 0 ]; then
  echo "Please resolve documentation issues detected below:"
  echo "$documentation"
  exit 1
fi

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