mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-28 06:46:52 +08:00
Add better detection for KornShell/ksh
This commit is contained in:
@@ -57,6 +57,22 @@ Execute(csh should be detected appropriately):
|
||||
AssertEqual 'csh', ale_linters#sh#shell#GetExecutable(bufnr(''))
|
||||
AssertEqual 'csh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
|
||||
|
||||
Given(A file with a ksh hashbang):
|
||||
#!/bin/ksh
|
||||
|
||||
Execute(/bin/ksh should be detected appropriately):
|
||||
AssertEqual 'ksh', ale#handlers#sh#GetShellType(bufnr(''))
|
||||
AssertEqual 'ksh', ale_linters#sh#shell#GetExecutable(bufnr(''))
|
||||
AssertEqual 'ksh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
|
||||
|
||||
Given(A file with a ksh as an argument to env):
|
||||
#!/usr/bin/env ksh
|
||||
|
||||
Execute(ksh should be detected appropriately):
|
||||
AssertEqual 'ksh', ale#handlers#sh#GetShellType(bufnr(''))
|
||||
AssertEqual 'ksh', ale_linters#sh#shell#GetExecutable(bufnr(''))
|
||||
AssertEqual 'ksh', ale_linters#sh#shellcheck#GetDialectArgument(bufnr(''))
|
||||
|
||||
Given(A file with a sh hash bang and arguments):
|
||||
#!/usr/bin/env sh -eu --foobar
|
||||
|
||||
|
||||
Reference in New Issue
Block a user