diff --git a/.github/workflows/shellcheck.yaml b/.github/workflows/shellcheck.yaml new file mode 100644 index 0000000..2140c90 --- /dev/null +++ b/.github/workflows/shellcheck.yaml @@ -0,0 +1,11 @@ +# Run shellcheck on push + +on: [push, pull_request] +jobs: + shellcheck: + name: Shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run Shellcheck + uses: ludeeus/action-shellcheck@master diff --git a/KubuQA.sh b/KubuQA.sh index 18dfac2..b63fe53 100755 --- a/KubuQA.sh +++ b/KubuQA.sh @@ -1,4 +1,5 @@ #!/bin/bash +# shellcheck disable=SC1090 # This script automates downloading the latest daily ISO for Kubuntu and spinning up a VM in VirtualBox. # It uses VBoxManage to set up the VM, look here for documentation: https://www.virtualbox.org/manual/ch08.html @@ -130,7 +131,7 @@ function check_existing_vdi() { function check_existing_iso() { # Ensure the ISO Download directory exists mkdir -p "$ISO_DOWNLOAD_DIR" - cd "$ISO_DOWNLOAD_DIR" + cd "$ISO_DOWNLOAD_DIR" || kdialog --error "There is something wrong with the ISO Download directory. Make sure it is accessible." # Check if the ISO file exists, and has already been downloaded if [ -f "$ISO_FILENAME" ]; then # Prompt the user to check for updates diff --git a/README.md b/README.md index 992f8fc..a9819a7 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,8 @@ Keep in mind that when the same variable is being set multiple times (e.g. in a If you have ideas for additions or improvements please do create an Issue, or open a Pull Request on our [Github KubuQA](https://github.com/kubuntu-team/KubuQA). +Please make sure your code contribution passes [Shellcheck](https://github.com/koalaman/shellcheck), to ensure good code quality. + ### Ideas (so far) - [ ] [Introductory dialog that gives an overview of what is about to happen](https://github.com/kubuntu-team/KubuQA/issues/7)