From 02c0d5bcb9f7d4191a5e069aa0b8cd4065d6c039 Mon Sep 17 00:00:00 2001 From: Anthony Poon Date: Fri, 26 Oct 2018 01:30:49 +1100 Subject: Only run stack if a stack.yaml config is found (#1752) * Only run stack if a stack.yaml config is found It is necessary to check for a stack.yaml file to distinguish between cabal-only projects or stack projects (which are also cabal projects since stack is built on top of cabal). * Test that stack is called if stack.yaml exists --- ale_linters/haskell/stack_build.vim | 2 +- ale_linters/haskell/stack_ghc.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ale_linters') diff --git a/ale_linters/haskell/stack_build.vim b/ale_linters/haskell/stack_build.vim index f5bdf4b8..95a54587 100644 --- a/ale_linters/haskell/stack_build.vim +++ b/ale_linters/haskell/stack_build.vim @@ -16,7 +16,7 @@ call ale#linter#Define('haskell', { \ 'name': 'stack_build', \ 'aliases': ['stack-build'], \ 'output_stream': 'stderr', -\ 'executable': 'stack', +\ 'executable_callback': 'ale#handlers#haskell#GetStackExecutable', \ 'command_callback': 'ale_linters#haskell#stack_build#GetCommand', \ 'lint_file': 1, \ 'callback': 'ale#handlers#haskell#HandleGHCFormat', diff --git a/ale_linters/haskell/stack_ghc.vim b/ale_linters/haskell/stack_ghc.vim index d702aa68..8f42b96c 100644 --- a/ale_linters/haskell/stack_ghc.vim +++ b/ale_linters/haskell/stack_ghc.vim @@ -5,7 +5,7 @@ call ale#linter#Define('haskell', { \ 'name': 'stack_ghc', \ 'aliases': ['stack-ghc'], \ 'output_stream': 'stderr', -\ 'executable': 'stack', +\ 'executable_callback': 'ale#handlers#haskell#GetStackExecutable', \ 'command': 'stack ghc -- -fno-code -v0 %t', \ 'callback': 'ale#handlers#haskell#HandleGHCFormat', \}) -- cgit v1.2.3