From fa616aea0a12cc7361eda888a6449f2faa1a39fa Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 15 Dec 2023 16:45:15 -0500 Subject: [PATCH] jjb: babeltrace: add shellcheck to lint jobs Change-Id: Id709f4982c66a11ae0188f257e21a9332c6fb85b Signed-off-by: Michael Jeanson --- automation/ansible/roles/babeltrace/vars/Debian.yml | 1 + jobs/babeltrace.yaml | 4 ++-- scripts/babeltrace/lint.sh | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/automation/ansible/roles/babeltrace/vars/Debian.yml b/automation/ansible/roles/babeltrace/vars/Debian.yml index d71e280..76ae912 100644 --- a/automation/ansible/roles/babeltrace/vars/Debian.yml +++ b/automation/ansible/roles/babeltrace/vars/Debian.yml @@ -8,5 +8,6 @@ babeltrace_packages: - libpopt-dev - python3-dev - python3-sphinx + - shellcheck - swig - uuid-dev diff --git a/jobs/babeltrace.yaml b/jobs/babeltrace.yaml index 7f8abe7..66d5be7 100644 --- a/jobs/babeltrace.yaml +++ b/jobs/babeltrace.yaml @@ -370,7 +370,7 @@ publishers: - archive: - artifacts: 'black.out,flake8.out,isort.out,clang-format.out' + artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out' allow-empty: false - workspace-cleanup: *babeltrace_publisher_workspace-cleanup_defaults @@ -543,7 +543,7 @@ publishers: - workspace-cleanup: *babeltrace_publisher_workspace-cleanup_defaults - archive: - artifacts: 'black.out,flake8.out,isort.out,clang-format.out' + artifacts: 'black.out,flake8.out,isort.out,clang-format.out,shellcheck.out' allow-empty: false - ircbot: *babeltrace_publisher_ircbot_defaults - email-ext: *babeltrace_publisher_email-ext_defaults diff --git a/scripts/babeltrace/lint.sh b/scripts/babeltrace/lint.sh index 9471f43..e177990 100755 --- a/scripts/babeltrace/lint.sh +++ b/scripts/babeltrace/lint.sh @@ -65,4 +65,8 @@ if [[ -f tools/format-cpp.sh ]]; then git diff --exit-code | tee ../../clang-format.out || exit_code=1 fi +if [[ -f tools/shellcheck.sh ]]; then + tools/shellcheck.sh | tee ../../shellcheck.out || exit_code=1 +fi + exit $exit_code -- 2.34.1