New Issue Checklist
Bug Description
As the title suggests, optional_data_string_conversion does not trigger when calling String.init() instead of directly calling String().
Example:
// This triggers a violation:
let text = String(decoding: data, as: UTF8.self)
// This does not trigger a violation:
let text: String = .init(decoding: data, as: UTF8.self)
(swiftlint is in its default configuration, ran by xcode)
Environment
- SwiftLint version — 0.62.2
- Xcode version — 26.1 (17B55)
- Installation method used (Homebrew, CocoaPods, building from source, etc)
- Configuration file:
Are you using nested configurations? If so, paste their
relative paths and respective contents.
N/A