Add support for Swift with swiftlint (#214)

* Add support for swift with swiftlint

* Fix issue by adding '.swift' file extension
This commit is contained in:
David Mohundro 2016-12-13 09:28:20 -06:00 committed by w0rp
parent 10777d3421
commit 3418faf054
3 changed files with 11 additions and 0 deletions

View file

@ -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) | | 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) | | 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) | | Scala | [scalac](http://scala-lang.org) |
| Swift | [swiftlint](https://swift.org/) |
| Tex | [proselint](http://proselint.com/) | | Tex | [proselint](http://proselint.com/) |
| Text | [proselint](http://proselint.com/) | | Text | [proselint](http://proselint.com/) |
| TypeScript | [tslint](https://github.com/palantir/tslint), typecheck | | TypeScript | [tslint](https://github.com/palantir/tslint), typecheck |

View file

@ -0,0 +1,9 @@
" Author: David Mohundro <david@mohundro.com>
" 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',
\})

View file

@ -92,6 +92,7 @@ The following languages and tools are supported.
* SASS: 'sasslint', 'stylelint' * SASS: 'sasslint', 'stylelint'
* SCSS: 'sasslint', 'scsslint', 'stylelint' * SCSS: 'sasslint', 'scsslint', 'stylelint'
* Scala: 'scalac' * Scala: 'scalac'
* Swift: 'swiftlint'
* TypeScript: 'tslint', 'typecheck' * TypeScript: 'tslint', 'typecheck'
* Verilog: 'iverilog', 'verilator' * Verilog: 'iverilog', 'verilator'
* Vim: 'vint' * Vim: 'vint'