Skip to content

Fix redundant_optional_initialization autocorrect#3717

Merged
PaulTaykalo merged 3 commits into
realm:masterfrom
naru-jpn:fix-redundant_optional_initialization-autocorrect
Sep 30, 2021
Merged

Fix redundant_optional_initialization autocorrect#3717
PaulTaykalo merged 3 commits into
realm:masterfrom
naru-jpn:fix-redundant_optional_initialization-autocorrect

Conversation

@naru-jpn
Copy link
Copy Markdown
Contributor

@naru-jpn naru-jpn commented Sep 13, 2021

Fix redundant_optional_initialization autocorrect broken in case observer's brace exists.

Input Expected Autocorrect Result Actual Autocorrect Result
var myVar: Int? = nil { var myVar: Int? { var myVar: Int?

Closes #3718.
Related to #3671.

@SwiftLintBot
Copy link
Copy Markdown

SwiftLintBot commented Sep 22, 2021

12 Messages
📖 Linting Aerial with this PR took 0.23s vs 0.23s on master (0% slower)
📖 Linting Alamofire with this PR took 0.26s vs 0.26s on master (0% slower)
📖 Linting Firefox with this PR took 1.15s vs 1.16s on master (0% faster)
📖 Linting Kickstarter with this PR took 1.76s vs 1.77s on master (0% faster)
📖 Linting Moya with this PR took 0.13s vs 0.13s on master (0% slower)
📖 Linting Nimble with this PR took 0.14s vs 0.14s on master (0% slower)
📖 Linting Quick with this PR took 0.07s vs 0.07s on master (0% slower)
📖 Linting Realm with this PR took 0.55s vs 0.56s on master (1% faster)
📖 Linting SourceKitten with this PR took 0.12s vs 0.12s on master (0% slower)
📖 Linting Sourcery with this PR took 0.38s vs 0.39s on master (2% faster)
📖 Linting Swift with this PR took 1.23s vs 1.23s on master (0% slower)
📖 Linting WordPress with this PR took 1.99s vs 2.0s on master (0% faster)

Generated by 🚫 Danger

@naru-jpn naru-jpn force-pushed the fix-redundant_optional_initialization-autocorrect branch from 5dc7571 to d8f468b Compare September 22, 2021 02:28
@PaulTaykalo PaulTaykalo force-pushed the fix-redundant_optional_initialization-autocorrect branch from 4b886e2 to 306a62d Compare September 30, 2021 22:50
@PaulTaykalo PaulTaykalo enabled auto-merge (squash) September 30, 2021 22:52
@PaulTaykalo PaulTaykalo merged commit e4ff164 into realm:master Sep 30, 2021
@naru-jpn naru-jpn deleted the fix-redundant_optional_initialization-autocorrect branch October 1, 2021 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

redundant_optional_initialization removes opening bracket before property observer

4 participants