You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DiscouragedDirectInitRule should apply to NSError(). Directly initializing NSError results in a runtime warning:
-[NSError init] called; this results in an invalid NSError instance. It will raise an exception in a future release. Please call errorWithDomain:code:userInfo: or initWithDomain:code:userInfo:. This message shown only once.
Complete output when running SwiftLint, including the stack trace and command used
n/a
Environment
SwiftLint version (run swiftlint version to be sure)? 0.49.1
Installation method used (Homebrew, CocoaPods, building from source, etc)? Homebrew
Paste your configuration file: uses defaults
Are you using nested configurations?
If so, paste their relative paths and respective contents. no
Which Xcode version are you using (check xcodebuild -version)? Xcode 14.1
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.
letfoo=NSError()
The text was updated successfully, but these errors were encountered:
New Issue Checklist
Describe the bug
DiscouragedDirectInitRule should apply to
NSError()
. Directly initializingNSError
results in a runtime warning:Complete output when running SwiftLint, including the stack trace and command used
n/a
Environment
SwiftLint version (run
swiftlint version
to be sure)? 0.49.1Installation method used (Homebrew, CocoaPods, building from source, etc)? Homebrew
Paste your configuration file: uses defaults
Are you using nested configurations?
If so, paste their relative paths and respective contents. no
Which Xcode version are you using (check
xcodebuild -version
)? Xcode 14.1Do 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
.The text was updated successfully, but these errors were encountered: