Skip to content

Commit

Permalink
Un-indent docs script for pre-commit hook (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
onelxj authored Sep 30, 2024
1 parent 6564518 commit 709d954
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 709d954

Please sign in to comment.