Skip to content

Commit 8fa1fb6

Browse files
committed
Update for ExecutionMode.default
1 parent e0d7686 commit 8fa1fb6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
This may result in subtle behavioral differences. While performance is significantly improved,
1616
rules that rely on specific SourceKit behaviors may need adjustment. Users can temporarily
1717
revert to the legacy SourceKit behavior by setting `default_execution_mode: sourcekit` in
18-
their custom rules configuration or `mode: sourcekit` for individual rules. The SourceKit
19-
mode is deprecated and will be removed in a future version.
18+
their custom rules configuration or `execution_mode: sourcekit` for individual rules.
19+
The SourceKit mode is deprecated and will be removed in a future version.
2020
[JP Simard](https://github.com/jpsim)
2121

2222
### Experimental

Source/SwiftLintFramework/Rules/CustomRules.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ struct CustomRules: Rule, CacheDescriptionProvider, ConditionallySourceKitFree {
106106
let excludingKinds = configuration.excludedMatchKinds
107107

108108
// Determine effective execution mode (defaults to swiftsyntax if not specified)
109-
let effectiveMode = configuration.executionMode ?? self.configuration.defaultExecutionMode ?? .swiftsyntax
109+
let effectiveMode = configuration.executionMode == .default
110+
? (self.configuration.defaultExecutionMode ?? .swiftsyntax)
111+
: configuration.executionMode
110112
let needsKindMatching = !excludingKinds.isEmpty
111113

112114
let matches: [NSRange]

0 commit comments

Comments
 (0)