[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode e733088 073/496: Merge pull request #20 from ap
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode e733088 073/496: Merge pull request #20 from ap4y/flycheck_plugin |
Date: |
Sun, 29 Aug 2021 11:33:10 -0400 (EDT) |
branch: elpa/swift-mode
commit e7330885d05b3095fdb429d9846cbbbdb873b96e
Merge: ae32a8b cd0aa34
Author: Chris Barrett <chris.d.barrett@me.com>
Commit: Chris Barrett <chris.d.barrett@me.com>
Merge pull request #20 from ap4y/flycheck_plugin
Add flycheck support
---
swift-mode.el | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/swift-mode.el b/swift-mode.el
index 84faaff..a226a9b 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -293,6 +293,29 @@ Returns the column number as an integer."
(list "Variables" (swift-mode--mk-regex-for-def "var") 1))
"Value for `imenu-generic-expression' in swift-mode.")
+;;; Flycheck
+
+(eval-after-load 'flycheck
+ '(progn
+ (flycheck-def-option-var flycheck-swift-sdk-path nil swift
+ "A path to the targeted SDK"
+ :type '(repeat (directory :tag "iOS/MacOS SDK directory"))
+ :safe #'flycheck-string-list-p)
+
+ (flycheck-define-checker swift
+ "Flycheck plugin for for Apple's Swift programming language."
+ :command ("swift"
+ (option-list "-sdk" flycheck-swift-sdk-path)
+ "-parse" source)
+ :error-patterns
+ ((error line-start (file-name) ":" line ":" column ": "
+ "error: " (message) line-end)
+ (warning line-start (file-name) ":" line ":" column ": "
+ "warning: " (message) line-end))
+ :modes swift-mode)
+
+ (add-to-list 'flycheck-checkers 'swift)))
+
;;; Mode definition
;; HACK: This syntax table is lifted directly from `rust-mode'. There may be
- [nongnu] elpa/swift-mode 654d5e2 006/496: More work on font locking, (continued)
- [nongnu] elpa/swift-mode 654d5e2 006/496: More work on font locking, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c4943a8 025/496: Add to auto-mode-alist, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0ad90f8 035/496: Fix a typo, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 19a61d9 022/496: fixup! Copy syntax table from rust-mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 406f2ba 028/496: Mention Emacs version in readme, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 2ca1425 026/496: Remove ackrc and travis yaml for now, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ec9243c 032/496: Tweaks to indentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1b3ebe8 046/496: Remove obsolete require, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 90cdeb5 057/496: Configure travis, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 9714a0c 063/496: Fix docstring typo, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode e733088 073/496: Merge pull request #20 from ap4y/flycheck_plugin,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 5aa4010 082/496: Replace if not with unless, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 3a82dd5 085/496: Add mode menu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 32e08b3 095/496: Add initial implementation of smie based indentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b1334e1 101/496: Highlight interpolation expression via syntactic fontification, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode d053d31 109/496: Use greedy regex in interpolation highlighting to prevent issues with, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ecb8a87 114/496: Use different lexer rule for case statement in enum to fix issues with, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 27b93dd 126/496: Merge pull request #34 from ap4y/string_interpolation_improvements, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c08c3a1 138/496: Define dot-exp smie rule as combination of ids rather than expressions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b5bfbe0 154/496: Don't active flycheck checker by default, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c73d653 151/496: Use correct function from cl-lib, ELPA Syncer, 2021/08/29