Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shell-check #161

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: reviewdog

on: [push, pull_request, workflow_dispatch]

#jobs:

#checks:
#name: Check scripts
#runs-on: ubuntu-latest

#strategy:
#matrix:
#package:
# - "**/*.sh" # checks all .sh files
#- quickget
#- quickemu
#steps:
#- uses: actions/checkout@v3
#- uses: cachix/install-nix-action@v17
#with:
#install_url: https://nixos.org/nix/install
#extra_nix_config: |
#auto-optimise-store = true
#experimental-features = nix-command flakes
#- run: nix run nixpkgs#shellcheck -- -S error ${{ matrix.package }}

jobs:
quickemu-check:
name: runner / quickemu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review # Change reporter.
path: "." # Optional.
pattern: "quickemu" # Optional.
exclude: "./.git/*" # Optional.
check_all_files_with_shebangs: "false" # Optional.
quickget-check:
name: runner / quickget
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review # Change reporter.
path: "." # Optional.
pattern: "quickget" # Optional.
exclude: "./.git/*" # Optional.
check_all_files_with_shebangs: "false" # Optional.
11 changes: 6 additions & 5 deletions quickget
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#}

function cleanup() {
if [ -n "$(jobs -p)" ]; then

Check warning on line 25 in quickget

View workflow job for this annotation

GitHub Actions / runner / quickget

[shellcheck] reported by reviewdog 🐶 Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317) Raw Output: ./quickget:25:3:info:Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317)

Check warning on line 25 in quickget

View workflow job for this annotation

GitHub Actions / runner / quickget

[shellcheck] reported by reviewdog 🐶 Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317) Raw Output: ./quickget:25:6:info:Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317)

Check warning on line 25 in quickget

View workflow job for this annotation

GitHub Actions / runner / quickget

[shellcheck] reported by reviewdog 🐶 Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317) Raw Output: ./quickget:25:14:info:Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317)
kill "$(jobs -p)"

Check warning on line 26 in quickget

View workflow job for this annotation

GitHub Actions / runner / quickget

[shellcheck] reported by reviewdog 🐶 Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317) Raw Output: ./quickget:26:5:info:Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317)

Check warning on line 26 in quickget

View workflow job for this annotation

GitHub Actions / runner / quickget

[shellcheck] reported by reviewdog 🐶 Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317) Raw Output: ./quickget:26:13:info:Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317)
fi
}

Expand Down Expand Up @@ -373,23 +373,23 @@
}

function releases_alma() {
echo 8 9

Check warning on line 376 in quickget

View workflow job for this annotation

GitHub Actions / runner / quickget

[shellcheck] reported by reviewdog 🐶 Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317) Raw Output: ./quickget:376:5:info:Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317)
}

function editions_alma() {
echo boot minimal dvd

Check warning on line 380 in quickget

View workflow job for this annotation

GitHub Actions / runner / quickget

[shellcheck] reported by reviewdog 🐶 Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317) Raw Output: ./quickget:380:5:info:Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317)
}

function releases_alpine() {
echo 3.12 3.13 3.14 3.15 3.16 3.17 3.18 latest

Check warning on line 384 in quickget

View workflow job for this annotation

GitHub Actions / runner / quickget

[shellcheck] reported by reviewdog 🐶 Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317) Raw Output: ./quickget:384:5:info:Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317)
}

function releases_android() {
echo 7.1 8.1 9.0

Check warning on line 388 in quickget

View workflow job for this annotation

GitHub Actions / runner / quickget

[shellcheck] reported by reviewdog 🐶 Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317) Raw Output: ./quickget:388:5:info:Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317)
}

function editions_android() {
echo x86 x86_64

Check warning on line 392 in quickget

View workflow job for this annotation

GitHub Actions / runner / quickget

[shellcheck] reported by reviewdog 🐶 Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317) Raw Output: ./quickget:392:5:info:Command appears to be unreachable. Check usage (or ignore if invoked indirectly). [SC2317](https://github.com/koalaman/shellcheck/wiki/SC2317)
}

function releases_antix() {
Expand Down Expand Up @@ -818,18 +818,18 @@

case "${OS}" in
edubuntu|ubuntu-unity|ubuntucinnamon)
echo ${INTERIM_SUPPORT[@]} daily-live
echo "${INTERIM_SUPPORT[@]}" daily-live
;;
kubuntu|lubuntu|ubuntukylin|ubuntu-mate|ubuntustudio|xubuntu)
## after 14.04
echo ${LTS_SUPPORT[@]:1} ${INTERIM_SUPPORT[@]} daily-live jammy-daily ${EOL_VERSIONS[@]/#/eol-}
echo "${LTS_SUPPORT[@]:1}" "${INTERIM_SUPPORT[@]}" daily-live jammy-daily "${EOL_VERSIONS[@]/#/eol-}"
;;
ubuntu-budgie)
#after 16.04
echo ${LTS_SUPPORT[@]:2} ${INTERIM_SUPPORT[@]} daily-live jammy-daily ${EOL_VERSIONS[@]/#/eol-}
echo "${LTS_SUPPORT[@]:2}" "${INTERIM_SUPPORT[@]}" daily-live jammy-daily "${EOL_VERSIONS[@]/#/eol-}"
;;
ubuntu)
echo ${LTS_SUPPORT[@]} ${INTERIM_SUPPORT[@]} daily-live ${EOL_VERSIONS[@]/#/eol-}
echo "${LTS_SUPPORT[@]}" "${INTERIM_SUPPORT[@]}" daily-live "${EOL_VERSIONS[@]/#/eol-}"
;;
esac
}
Expand All @@ -852,7 +852,7 @@
fi
done

echo ${LTS_SUPPORT[@]} ${INTERIM_SUPPORT[@]} daily-live
echo "${LTS_SUPPORT[@]}" "${INTERIM_SUPPORT[@]}" daily-live
}

function releases_vanillaos() {
Expand Down Expand Up @@ -2785,6 +2785,7 @@

# Handle odd missing fedora cominations
if [[ $OS == fedora ]] ; then
#shellcheck disable=SC2071
if [[ ${RELEASE} = "33" && ${EDITION} = "i3" ]] || [[ ${RELEASE} = "34" && ${EDITION} = "Cinnamon" ]] || [[ "${RELEASE}" < "39" && ${EDITION} = "Onyx" ]]; then
echo "ERROR! Unsupported combination"
echo " Fedora ${RELEASE} ${EDITION} is not available, please choose another Release or Edition"
Expand Down