Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

shellcheck: fix errors, unwrap the version_lt logic #68

Merged
merged 6 commits into from
Oct 15, 2019

Conversation

mflendrich
Copy link
Contributor

Part of #66.

Fixes most of the shellcheck complaints.
Suppresses two - where the suggestion seems impractical (because bash variable expansion would look ugly with many slashes escaped)

One of the warnings referred to the complex logical expression in version_lt. Rewrote the expression for easier comprehension (hopefully).

After this PR:

$ shellcheck **.sh

In lib/functions.sh line 159:
    if ! command_exists "${cmd}" || [ "${download_force}" == "yes" ]; then
                                       ^---------------^ SC2154: download_force is referenced but not assigned.


In lib/functions.sh line 160:
        if [ "${download}" == "yes" ]; then
              ^---------^ SC2154: download is referenced but not assigned.

For more information:
  https://www.shellcheck.net/wiki/SC2154 -- download is referenced but not as...

@mflendrich mflendrich force-pushed the michal/2019-10-10-fix-shellcheck branch from bfbfaf7 to cd8d635 Compare October 10, 2019 08:52
@mflendrich mflendrich marked this pull request as ready for review October 10, 2019 08:52
Copy link
Contributor

@stealthybox stealthybox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice -- here are some comments:

lib/functions.sh Show resolved Hide resolved
setup.sh Outdated Show resolved Hide resolved
setup.sh Outdated Show resolved Hide resolved
lib/functions.sh Show resolved Hide resolved
lib/footloose.sh Outdated Show resolved Hide resolved
cleanup.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@stealthybox stealthybox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mflendrich mflendrich merged commit c95d0c4 into master Oct 15, 2019
@mflendrich mflendrich deleted the michal/2019-10-10-fix-shellcheck branch October 15, 2019 22:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants