From 3418faf0541cb5ab11edab6f27b367a3849af4e6 Mon Sep 17 00:00:00 2001 From: David Mohundro Date: Tue, 13 Dec 2016 09:28:20 -0600 Subject: [PATCH] Add support for Swift with swiftlint (#214) * Add support for swift with swiftlint * Fix issue by adding '.swift' file extension --- README.md | 1 + ale_linters/swift/swiftlint.vim | 9 +++++++++ doc/ale.txt | 1 + 3 files changed, 11 insertions(+) create mode 100644 ale_linters/swift/swiftlint.vim diff --git a/README.md b/README.md index 8cd60a94..9ae147c1 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ name. That seems to be the fairest way to arrange this table. | SASS | [sass-lint](https://www.npmjs.com/package/sass-lint), [stylelint](https://github.com/stylelint/stylelint) | | SCSS | [sass-lint](https://www.npmjs.com/package/sass-lint), [scss-lint](https://github.com/brigade/scss-lint), [stylelint](https://github.com/stylelint/stylelint) | | Scala | [scalac](http://scala-lang.org) | +| Swift | [swiftlint](https://swift.org/) | | Tex | [proselint](http://proselint.com/) | | Text | [proselint](http://proselint.com/) | | TypeScript | [tslint](https://github.com/palantir/tslint), typecheck | diff --git a/ale_linters/swift/swiftlint.vim b/ale_linters/swift/swiftlint.vim new file mode 100644 index 00000000..abbea0dd --- /dev/null +++ b/ale_linters/swift/swiftlint.vim @@ -0,0 +1,9 @@ +" Author: David Mohundro +" Description: swiftlint for swift files + +call ale#linter#Define('swiftlint', { +\ 'name': 'swiftlint', +\ 'executable': 'swiftlint', +\ 'command': g:ale#util#stdin_wrapper . ' .swift swiftlint', +\ 'callback': 'ale#handlers#HandleGCCFormat', +\}) diff --git a/doc/ale.txt b/doc/ale.txt index facc39f0..bed7e31f 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -92,6 +92,7 @@ The following languages and tools are supported. * SASS: 'sasslint', 'stylelint' * SCSS: 'sasslint', 'scsslint', 'stylelint' * Scala: 'scalac' +* Swift: 'swiftlint' * TypeScript: 'tslint', 'typecheck' * Verilog: 'iverilog', 'verilator' * Vim: 'vint'