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

Un-indent docs script for pre-commit hook #87

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion check-style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ if [ ! -z "${affected_files}" ]; then

# Check documentation snippets (which can be affected by changes in any other file).
markdown_files=$(find . -type f -iname '*.md')
unindent_auto_doc_script=$(find . -type f -name 'unindent_auto_doc.py')
pre_autodocs_checksum=$(calculate_checksum $markdown_files)
run_check markdown-autodocs -c code-block -o ${markdown_files} > /dev/null
run_check markdown-autodocs -c code-block -o ${markdown_files} && python $unindent_auto_doc_script ${markdown_files} > /dev/null
post_autodocs_checksum=$(calculate_checksum $markdown_files)
if [ "$pre_autodocs_checksum" != "$post_autodocs_checksum" ]; then
echo "There are code changes after running 'markdown-autodocs'."
Expand Down
Loading