I'm getting a false empty_enum_arguments on this line:
guard case let .success(tracksTableResult) = result, !newOperationGroup.isCanceled() else {
Only on the Xcode 13.3 beta though, it doesn't trigger on Xcode 13.2. Worth mentioning, isCanceled is a function, not a var, definitely not an enum.
Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint
Environment
SwiftLint version (run swiftlint version to be sure)? 0.46.3
Installation method used (Homebrew, CocoaPods, building from source, etc)? homebrew
Paste your configuration file:
opt_in_rules:
- nslocalizedstring_require_bundle
disabled_rules:
- cyclomatic_complexity
- discarded_notification_center_observer
- identifier_name
- implicit_getter
- file_length
- force_cast
- force_try
- function_body_length
- function_parameter_count
- large_tuple
- legacy_constructor
- line_length
- mark
- nesting
- notification_center_detachment
- todo
- type_body_length
- weak_delegate
- fallthrough
- block_based_kvo
- xctfail_message
custom_rules:
backgroundtask_usage:
name: begin/endbackgroundTask Usage
message: Do not use beginBackgroundTask or endBackgroundTask. Instead, use the BackgroundTask wrapper in Utilities.
regex: beginBackgroundTask\(|endBackgroundTask\(
severity: error
apply_usage:
name: DiffableDataSource Apply Usage
message: Do not use apply. iOS 14 and iOS 15 have different behaviors when using apply with no animation. Use sf_apply.
regex: (?<!sf_)apply\([^\n]*animatingDifferences
severity: error
id_usage:
name: ID Suffix
message: Identifier, arguments, parameters should not use mixed case for ID.
regex: Ids?\b
match_kinds:
- identifier
- argument
severity: warning
url_usage:
name: URL Suffix
message: Identifier, arguments, parameters should not use mixed case for URL.
regex: Urls?\b
match_kinds:
- identifier
- argument
severity: warning
Which Xcode version are you using (check xcodebuild -version)? Xcode 13.3 Build version 13E5104
Do you have a sample that shows the issue? Run echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
to quickly test if your example is really demonstrating the issue. If your example is more
complex, you can use swiftlint lint --path [file here] --no-cache --enable-all-rules.
// This triggers a violation:
guard case let .success(tracksTableResult) = result, !newOperationGroup.isCanceled() else {
New Issue Checklist
Describe the bug
I'm getting a false
empty_enum_arguments
on this line:Only on the Xcode 13.3 beta though, it doesn't trigger on Xcode 13.2. Worth mentioning,
isCanceled
is a function, not a var, definitely not an enum.Complete output when running SwiftLint, including the stack trace and command used
Environment
swiftlint version
to be sure)? 0.46.3xcodebuild -version
)? Xcode 13.3 Build version 13E5104echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
to quickly test if your example is really demonstrating the issue. If your example is more complex, you can useswiftlint lint --path [file here] --no-cache --enable-all-rules
.With Xcode version 13.3