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

resolve array issues reported by shellcheck #55

Merged
merged 2 commits into from
Jun 22, 2017
Merged

resolve array issues reported by shellcheck #55

merged 2 commits into from
Jun 22, 2017

Conversation

mobilemind
Copy link
Contributor

@mobilemind mobilemind commented Apr 8, 2017

shellcheck utility identified 3 issues relating to use of arrays in rmate. This PR attempts to resolve them. Proposed resolution is a "$filepaths[*]" array expansion in the first case and use of array assignment filepaths=('-') for the second 2 cases.

The snippet below shows the issues as reported by shellcheck v 0.4.6.

shellcheck rmate | grep -E -B 4 'SC21[27]8'

In rmate line 212:
if [ "$filepaths" = "" ]; then
      ^-- SC2128: Expanding an array without an index only gives the first element.
--
In rmate line 214:
        filepaths='-'
        ^-- SC2178: Variable was used as an array but is now assigned a string.
--
In rmate line 222:
                filepaths='-'
                ^-- SC2178: Variable was used as an array but is now assigned a string.

@aurora aurora merged commit 01beed3 into aurora:master Jun 22, 2017
@aurora
Copy link
Owner

aurora commented Jun 22, 2017

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants