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

In POSIX sh, 'local' is undefined. [SC2039] #481

Closed
croaky opened this issue Feb 10, 2017 · 2 comments
Closed

In POSIX sh, 'local' is undefined. [SC2039] #481

croaky opened this issue Feb 10, 2017 · 2 comments

Comments

@croaky
Copy link
Contributor

croaky commented Feb 10, 2017

@thoughtbot/shell We use local quite a few times in the script but ShellCheck doesn't like it. Thoughts on how to approach it?

@mike-burns
Copy link
Contributor

The best I got is this: https://stackoverflow.com/questions/18597697/posix-compliant-way-to-scope-variables-to-a-function-in-a-shell-script#answer-18600920

Which points out that local is understood by most OSes.

@croaky
Copy link
Contributor Author

croaky commented Feb 10, 2017

Cool, thanks. Going to add this config to my vimrc:

let g:syntastic_sh_shellcheck_args="-e SC2039"

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