From b23fbd4046312cff4d05b82b4ad5c5f44600fa8f Mon Sep 17 00:00:00 2001 From: Zakhar Date: Fri, 27 Sep 2024 15:30:59 +0000 Subject: [PATCH] Un-indent docs script for pre-commit hook --- check-style.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/check-style.sh b/check-style.sh index 4bd888c..471f569 100755 --- a/check-style.sh +++ b/check-style.sh @@ -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 > /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'."