Commit 2f4509bc authored by Charles Ferguson's avatar Charles Ferguson
Browse files

Update the output format so that mixed languages look tidier.

The shell + python output looked very untidy because the indentation
was very wrong. Really we could do with using one of the exec formats
to handle the output instead of merely piping outputs. But for now
this does the job.
parent b9713b17
......@@ -301,7 +301,7 @@ function report_file() {
local filename="$1"
local message="$2"
echo " $filename: $message"
echo "$filename: $message"
}
......@@ -314,7 +314,7 @@ function report_failure() {
local filename="$1"
local message="${2:-FAILED}"
echo " $filename: $message"
echo "$filename: $message"
}
......@@ -323,11 +323,11 @@ function report_failure() {
#
# @param $1 filename being looked at
# @param $2 message to display
function report_failure() {
function report_success() {
local filename="$1"
local message="${2:-Success}"
echo " $filename: $message"
echo "$filename: $message"
}
......
......@@ -59,16 +59,16 @@ function shell_setup_lint() {
function shell_run_lint() {
local message="Linting Shell files"
echo " Linting Shell files"
for file in $(config -e lint_shell_files '{shell}') ; do
if ! shellcheck "$file" 2>&1 \
| output_filter "$message" ; then
| output_filter " $(report_failure "$file")"; then
lint_failed=$(( lint_failed+1 ))
else
report_success " $file"
lint_passed=$(( lint_passed+1 ))
fi
message="+"
lint_total=$(( lint_total+1 ))
done
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment