-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: Add checker to ensure that env variable doc is up to date #5091
Conversation
Signed-off-by: Simon Behar <[email protected]>
hack/check-env-doc.sh
Outdated
echo "Documented variable $x is not used anywhere"; | ||
exit 1; | ||
fi; | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add reverse case: "Variable in use is not documented"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great to have! Thanks. Would you like to get #5080 merged so that we can test out the script in this PR?
Signed-off-by: Simon Behar <[email protected]>
Signed-off-by: Simon Behar <[email protected]>
Signed-off-by: Simon Behar <[email protected]>
Signed-off-by: Simon Behar <[email protected]>
Signed-off-by: Simon Behar <[email protected]>
Signed-off-by: Simon Behar <[email protected]>
Signed-off-by: Simon Behar <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just some small nitpicks.
hack/check-env-doc.sh
Outdated
@@ -0,0 +1,33 @@ | |||
#!/bin/bash | |||
|
|||
echo "Checking env variables doc for completness..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps be explicit about where the file is
|
||
echo "Checking docs/environment-variables.md for completeness..." | ||
|
||
function check-used { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add -o
Signed-off-by: Simon Behar <[email protected]>
Signed-off-by: Simon Behar <[email protected]> Signed-off-by: Alex Collins <[email protected]>
Checklist: