[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode c9c1271 089/496: Make flycheck work with multip
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode c9c1271 089/496: Make flycheck work with multiple sources |
Date: |
Sun, 29 Aug 2021 11:33:13 -0400 (EDT) |
branch: elpa/swift-mode
commit c9c12710e3211a71400f6b8df7d14c4d6856a226
Author: ap4y <lod@pisem.net>
Commit: ap4y <lod@pisem.net>
Make flycheck work with multiple sources
---
swift-mode.el | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/swift-mode.el b/swift-mode.el
index ad48ca8..c191ce6 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -308,11 +308,32 @@ Returns the column number as an integer."
:type '(repeat (directory :tag "iOS/MacOS SDK directory"))
:safe #'flycheck-string-list-p)
+ (flycheck-def-option-var flycheck-swift-linked-sources nil swift
+ "Source files path to link against. Can be glob, i.e. *.swift"
+ :type '(choice (const :tag "Don't use linked sources" nil)
+ (string :tag "Linked Sources"))
+ :safe #'stringp)
+
(flycheck-define-checker swift
"Flycheck plugin for for Apple's Swift programming language."
:command ("swift"
+ "-frontend" "-parse"
(option-list "-sdk" flycheck-swift-sdk-path)
- "-parse" source)
+ ;; Swift compiler will complain about redeclaration
+ ;; if we will include original file along with
+ ;; temporary source file created by flycheck.
+ ;; We also don't want a hidden emacs interlock files.
+ (eval
+ (let (source file)
+ (setq source (flycheck-substitute-argument 'source 'swift))
+ (setq file (file-name-nondirectory source))
+ (remove-if-not
+ #'(lambda (path)
+ (and
+ (eq (string-match ".#" path) nil)
+ (eq (string-match file path) nil)))
+ (file-expand-wildcards flycheck-swift-linked-sources))))
+ "-primary-file" source)
:error-patterns
((error line-start (file-name) ":" line ":" column ": "
"error: " (message) line-end)
- [nongnu] elpa/swift-mode cbb19f2 003/496: Add basic font-locking, (continued)
- [nongnu] elpa/swift-mode cbb19f2 003/496: Add basic font-locking, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7df8b6d 037/496: Remove dash.el dependency., ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 09b50fa 042/496: [Fix #12] Merge mode code in a single file, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c882c70 053/496: Replace `if` exprs with `when` exprs, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode d136303 076/496: Adding support for Swift REPL via comint-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 286c4b8 077/496: Merge pull request #21 from ap4y/feature_repl, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode e0fba71 083/496: repl -> REPL, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 48cbf55 088/496: Extend a bit installation instructions for package.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7e77211 087/496: Remove redundant autoload, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode a092adc 091/496: Return default paragraph definitions., ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c9c1271 089/496: Make flycheck work with multiple sources,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 4ac4ea3 098/496: Add font-lock for declaration expression with destructuring, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 6abb788 121/496: Add keywords header, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 07780b4 118/496: Merge pull request #30 from ap4y/syntactic_fontification, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 18ea989 134/496: Merge pull request #42 from ap4y/customizable_multiline_dot_statement, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode d42c53c 147/496: Use semantic smie function instead of regex for multi-line dot, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 34f0c95 152/496: Correct source argument extraction in flycheck checker, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 773219a 142/496: Treat default clause for case statement as a whole with colon in bnf, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode d7b13b0 150/496: Convert targeted sdk flycheck option from list to string, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b0fea47 168/496: Fix eval-after-load problems when byte-compiled., ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode e859716 176/496: Merge pull request #75 from ap4y/test_against_24_4, ELPA Syncer, 2021/08/29