SwiftLint
SwiftLint copied to clipboard
fix: skip redundant_optional_initialization for @Parameter variables …
…(#5884)
This change updates ImplicitOptionalInitializationRule so that variables annotated with @Parameter (from TipKit) are ignored when checking for redundant nil initializers. TipKit's @Parameter macro requires explicitly initializing optional parameters to nil; otherwise the macro fails to expand. Without this change, the implicit_optional_initialization rule incorrectly flags these initializers, forcing developers to disable the rule.
Resolves #5884.
| 1 Error | |
|---|---|
| :no_entry_sign: | OSSCheck was cancelled |
| 1 Warning | |
|---|---|
| :warning: | If this is a user-facing change, please include a CHANGELOG entry to credit yourself! You can find it at CHANGELOG.md. |
Here's an example of your CHANGELOG entry:
* fix: skip redundant_optional_initialization for @Parameter variables ….
[chetan-kmr-0607](https://github.com/chetan-kmr-0607)
[#issue_number](https://github.com/realm/SwiftLint/issues/issue_number)
note: There are two invisible spaces after the entry's text.
Generated by :no_entry_sign: Danger