]> git.madduck.net Git - etc/vim.git/blob - test/linter/test_swiftlint.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / test / linter / test_swiftlint.vader
1 Before:
2   call ale#assert#SetUpLinterTest('swift', 'swiftlint')
3
4 After:
5   call ale#assert#TearDownLinterTest()
6
7 Execute(Global installation should be the default executable):
8   call ale#test#SetFilename('../test-files/swiftlint/global/testfile.swift')
9
10   AssertEqual
11   \ 'swiftlint',
12   \ ale_linters#swift#swiftlint#GetExecutable(bufnr(''))
13
14 Execute(React Native apps using CocoaPods should take precedence over the default executable):
15   call ale#test#SetFilename('../test-files/swiftlint/react-native/testfile.swift')
16
17   AssertEqual
18   \ tolower(ale#test#GetFilename('../test-files/swiftlint/react-native/ios/Pods/SwiftLint/swiftlint')),
19   \ tolower(ale_linters#swift#swiftlint#GetExecutable(bufnr('')))
20
21 Execute(CocoaPods installation should take precedence over the default executable):
22   call ale#test#SetFilename('../test-files/swiftlint/cocoapods/testfile.swift')
23
24   AssertEqual
25   \ tolower(ale#test#GetFilename('../test-files/swiftlint/cocoapods/Pods/SwiftLint/swiftlint')),
26   \ tolower(ale_linters#swift#swiftlint#GetExecutable(bufnr('')))
27
28 Execute(Top level CocoaPods installation should take precedence over React Native installation):
29   call ale#test#SetFilename('../test-files/swiftlint/cocoapods-and-react-native/testfile.swift')
30
31   AssertEqual
32   \ tolower(ale#test#GetFilename('../test-files/swiftlint/cocoapods-and-react-native/Pods/SwiftLint/swiftlint')),
33   \ tolower(ale_linters#swift#swiftlint#GetExecutable(bufnr('')))
34
35 Execute(use-global should override other versions):
36   let g:ale_swift_swiftlint_use_global = 1
37   let g:ale_swift_swiftlint_executable = 'swiftlint_d'
38
39   call ale#test#SetFilename('../test-files/swiftlint/cocoapods-and-react-native/testfile.swift')
40
41   AssertEqual
42   \ 'swiftlint_d',
43   \ ale_linters#swift#swiftlint#GetExecutable(bufnr(''))