From 7eb8ca393c159db2791c2f5911b8b12f4f7687c5 Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Tue, 17 Sep 2024 18:12:44 +0200 Subject: [PATCH] Linting fix --- lint-check.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lint-check.sh b/lint-check.sh index 869f51b7..58260bfe 100644 --- a/lint-check.sh +++ b/lint-check.sh @@ -1,9 +1,10 @@ #!/bin/bash # Run autopep8 with --diff and capture the output -diff_output=$(autopep8 --select=E1,E2,E3,W,E4,E7,E502 --recursive --diff --exclude '**/cloudharness_cli/**/*,**/models/*,**/model/*' .) +diff_output=$(python -m autopep8 --select=E1,E2,E3,W,E4,E7,E502 --recursive --diff --exclude '**/cloudharness_cli/**/*,**/models/*,**/model/*' .) # Check if the output is non-empty if [ -n "$diff_output" ]; then - echo $diff_output - echo "Code style issues found in the above files. Please run autopep8 to fix." + printf "%s\n" "$diff_output" + echo "Code style issues found in the above files. To fix you can run: " + echo "autopep8 --select=E1,E2,E3,W,E4,E7,E502 --recursive --in-place --exclude '**/cloudharness_cli/**/*,**/models/*,**/model/*'" exit 1 fi \ No newline at end of file