https://github.com/swift-emacs/flycheck-swift
Flycheck extension for Apple's Swift programming language.
https://github.com/swift-emacs/flycheck-swift
emacs emacs-lisp flycheck flycheck-extension flycheck-swift swift swift-programming-language
Last synced: 10 months ago
JSON representation
Flycheck extension for Apple's Swift programming language.
- Host: GitHub
- URL: https://github.com/swift-emacs/flycheck-swift
- Owner: swift-emacs
- License: gpl-3.0
- Created: 2016-09-10T13:25:39.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-09-09T11:13:41.000Z (almost 9 years ago)
- Last Synced: 2025-08-10T07:27:51.310Z (11 months ago)
- Topics: emacs, emacs-lisp, flycheck, flycheck-extension, flycheck-swift, swift, swift-programming-language
- Language: Emacs Lisp
- Size: 19.5 KB
- Stars: 13
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
[![License GPL 3][badge-license]][copying]
[](https://melpa.org/#/flycheck-swift)
[](https://melpa.org/#/flycheck-swift)
# flycheck-swift
Flycheck extension for Apple's Swift programming language.
## Installation
### Using MELPA
Install `flycheck-swift` package from MELPA.
Add the following line to the `~/.emacs.d/init.el` or `~/.emacs`.
```
(eval-after-load 'flycheck '(flycheck-swift-setup))
```
If you compile against iOS SDK, add the following lines:
```
(setq flycheck-swift-sdk-path "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk")
;; ↑ Select the appropriate SDK version you use
(setq flycheck-swift-target "arm64-apple-ios10")
```
### Manual installation
Install [Flycheck](http://www.flycheck.org/en/latest/user/installation.html).
```
git clone --depth 1 https://github.com/swift-emacs/flycheck-swift.git
cd flycheck-swift
emacs --batch -l package -f package-initialize --eval '(package-install-file "flycheck-swift.el")'
```
Add the following line to the `~/.emacs.d/init.el` or `~/.emacs`.
```
(eval-after-load 'flycheck '(flycheck-swift-setup))
```
If you compile against iOS SDK, add the following lines:
```
(setq flycheck-swift-sdk-path "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk")
;; ↑ Select the appropriate SDK version you use
(setq flycheck-swift-target "arm64-apple-ios10")
```
### Using cask (for developer)
Install [cask](https://github.com/cask/cask).
```
git clone https://github.com/swift-emacs/flycheck-swift.git
cd flycheck-swift
make install
```
Add the following line to the `~/.emacs.d/init.el` or `~/.emacs`.
```
(eval-after-load 'flycheck '(flycheck-swift-setup))
```
If you compile against iOS SDK, add the following lines:
```
(setq flycheck-swift-sdk-path "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk")
;; ↑ Select the appropriate SDK version you use
(setq flycheck-swift-target "arm64-apple-ios10")
```
## Customization
### flycheck-swift-executable
The name of the executable, i.e. `swiftc`.
### flycheck-swift-extra-flags
Extra flags prepended to arguments of swiftc.
### flycheck-swift-sdk-path
A name of the targeted SDK or path to the targeted SDK.
### flycheck-swift-linked-sources
A list of source file paths to link against. Each path can be glob, i.e. `*.swift`.
### flycheck-swift-framework-search-paths
A list of framework search paths.
### flycheck-swift-cc-include-search-paths
A list of include file search paths to pass to the Objective-C compiler.
### flycheck-swift-target
Target used by swift compiler.
### flycheck-swift-import-objc-header
Objective C header file to import.
## License
GPLv3. See [COPYING][] for details. Copyright (C) 2014-2016 taku0, Chris Barrett, Bozhidar Batsov, Arthur Evstifeev.
[badge-license]: https://img.shields.io/badge/license-GPL_3-green.svg
[COPYING]: ./COPYING