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

make test fails #37

Open
eworm-de opened this issue Dec 14, 2022 · 1 comment
Open

make test fails #37

eworm-de opened this issue Dec 14, 2022 · 1 comment

Comments

@eworm-de
Copy link

... and thus building the Arch package breaks:

shellcheck -o all gpgit.sh

In gpgit.sh line 234:
    done < <(git show "${commit}:${changelog}")
             ^-- SC2312 (info): Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).


In gpgit.sh line 411:
check_dependency git sed grep awk md5sum shasum date || die "Please check your \$PATH variable or install the missing dependency."
^--------------^ SC2310 (info): This function is invoked in an || condition so set -e will be disabled. Invoke separately if failures should cause the script to exit.


In gpgit.sh line 412:
if [[ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" != "true" ]]; then
         ^-- SC2312 (info): Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).


In gpgit.sh line 413:
    die "Not a Git repository: $(pwd)"
                                 ^-^ SC2312 (info): Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).


In gpgit.sh line 417:
cd "$(git rev-parse --show-toplevel)"
      ^---------------------------^ SC2312 (info): Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).


In gpgit.sh line 425:
    readarray -t ALL_REMOTES <<< "$(git remote)"
                                    ^--------^ SC2312 (info): Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).


In gpgit.sh line 477:
check_dependency "${GPG_BIN}" "${COMPRESSION[@]}" \
^--------------^ SC2310 (info): This function is invoked in an || condition so set -e will be disabled. Invoke separately if failures should cause the script to exit.


In gpgit.sh line 511:
        if ! KEEPACHANGELOG="$(parse_keepachangelog "${CHANGELOG_FILE}" "${TAG}" "${COMMIT}")"; then
                               ^------------------^ SC2310 (info): This function is invoked in a ! condition so set -e will be disabled. Invoke separately if failures should cause the script to exit.
                               ^------------------^ SC2310 (info): This function is invoked in an 'if' condition so set -e will be disabled. Invoke separately if failures should cause the script to exit.
                               ^------------------^ SC2311 (info): Bash implicitly disabled set -e for this function invocation because it's inside a command substitution. Add set -e; before it or enable inherit_errexit.


In gpgit.sh line 524:
      && check_dependency jq file curl; then
         ^--------------^ SC2310 (info): This function is invoked in an 'if' condition so set -e will be disabled. Invoke separately if failures should cause the script to exit.


In gpgit.sh line 539:
    check_dependency jq file curl \
    ^--------------^ SC2310 (info): This function is invoked in an || condition so set -e will be disabled. Invoke separately if failures should cause the script to exit.


In gpgit.sh line 574:
    if [[ -n "$(${GPG_BIN} --list-secret-keys)" ]]; then
                ^---------------------------^ SC2312 (info): Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).


In gpgit.sh line 610:
        die "GPG key expired on $(date -d "@${GPG_EXPIRE_DATE}" +%F)"
                                  ^-- SC2312 (info): Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).


In gpgit.sh line 612:
        warning "GPG key will expire in less than 3 month: $(date -d "@${GPG_EXPIRE_DATE}" +%F)"
                                                             ^-- SC2312 (info): Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).


In gpgit.sh line 710:
if [[ -z "$(git tag -l "${TAG}")" ]] ; then
            ^-----------------^ SC2312 (info): Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).

For more information:
  https://www.shellcheck.net/wiki/SC2310 -- This function is invoked in a ! c...
  https://www.shellcheck.net/wiki/SC2311 -- Bash implicitly disabled set -e f...
  https://www.shellcheck.net/wiki/SC2312 -- Consider invoking this command se...
@NicoHood
Copy link
Owner

It seems shellcheck added some new warnings. We can ignore them for now when building, but I will try to fix them. Thanks for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants