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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add g:ale_sh_shellcheck_change_directory #2446

Merged

Conversation

fnichol
Copy link
Contributor

@fnichol fnichol commented Apr 18, 2019

This change adds a new g:ale_sh_shellcheck_change_directory option to control whether or not to change directory to where the source is located before running shellcheck. It defaults to 1, identical to the other linter directory-related options (I took heavy direction from the Python linters here) and so preserves the current behavior of ALE.

This is to help ShellCheck users that have a larger source base with sub-directories and CI that prefers to run from the root of a repository. As ShellCheck determines the relative directory in the shellcheck source=path/to/src.sh to be relative to the current working directory, it's hard to to have a value that satisfies both a *vim/ALE and a Makefile/TravisCI setup. The option here can be used as a first step to harmonize these two cases while any future features/changes in ShellCheck develop (see koalaman/shellcheck#769 and koalaman/shellcheck#539 for more context).


Thanks so much for your hard work on ALE. I know I'm not alone, and I know maintainers don't hear this nearly often enough, but tools like this really make a huge difference in daily developer life. ALE has made a massive difference for me and how I work, so thank you! 馃嵑

fnichol added a commit to fnichol/dotvim that referenced this pull request Apr 19, 2019
References dense-analysis/ale#2446

Signed-off-by: Fletcher Nichol <fnichol@nichol.ca>
@w0rp w0rp merged commit 4c6f67a into dense-analysis:master May 1, 2019
@w0rp
Copy link
Member

w0rp commented May 1, 2019

I finally had a chance to look at this, and it looks good to me. Cheers! 馃嵒

fnichol added a commit to fnichol/dotvim that referenced this pull request May 1, 2019
Signed-off-by: Fletcher Nichol <fnichol@nichol.ca>
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.

None yet

2 participants