Make `trailing_closure` rule correctable
This PR makes the trailing_closure rule correctable.
@SimplyDanny Do you know if there is anything I can do to make the pipeline-upload pass on CI or this is more like an issue on the CI end?
@SimplyDanny Do you know if there is anything I can do to make the
pipeline-uploadpass on CI or this is more like an issue on the CI end?
Please rebase. Build should be good again now.
| 17 Messages | |
|---|---|
| :book: | Linting Aerial with this PR took 0.99s vs 1.0s on main (1% faster) |
| :book: | Linting Alamofire with this PR took 1.45s vs 1.43s on main (1% slower) |
| :book: | Linting Brave with this PR took 8.37s vs 8.41s on main (0% faster) |
| :book: | Linting DuckDuckGo with this PR took 4.36s vs 4.35s on main (0% slower) |
| :book: | Linting Firefox with this PR took 10.39s vs 10.37s on main (0% slower) |
| :book: | Linting Kickstarter with this PR took 10.07s vs 10.07s on main (0% slower) |
| :book: | Linting Moya with this PR took 0.57s vs 0.57s on main (0% slower) |
| :book: | Linting NetNewsWire with this PR took 2.76s vs 2.75s on main (0% slower) |
| :book: | Linting Nimble with this PR took 0.82s vs 0.82s on main (0% slower) |
| :book: | Linting PocketCasts with this PR took 8.09s vs 8.08s on main (0% slower) |
| :book: | Linting Quick with this PR took 0.37s vs 0.37s on main (0% slower) |
| :book: | Linting Realm with this PR took 5.08s vs 5.07s on main (0% slower) |
| :book: | Linting Sourcery with this PR took 2.47s vs 2.47s on main (0% slower) |
| :book: | Linting Swift with this PR took 4.97s vs 4.98s on main (0% faster) |
| :book: | Linting VLC with this PR took 1.36s vs 1.36s on main (0% slower) |
| :book: | Linting Wire with this PR took 18.62s vs 18.7s on main (0% faster) |
| :book: | Linting WordPress with this PR took 12.23s vs 12.12s on main (0% slower) |
Generated by :no_entry_sign: Danger
@SimplyDanny Done rebasing. Let me know if there's anything else that needs to be done!
@SimplyDanny Applied the change to use the configuration via macro for the rewriter.
Looks fine. The rewrite ignores trivia, though.
Consider for example multiline parameters like
f(a: 1, b: 2, c: { 3 })or comments between parameters:
f(a: 1, // comment b: 2, /* comment */, c: { 3 })
@SimplyDanny I don't know if you meant the rewrite should keep the trivia or not but it currently keeps them as is (fd15a0d adds examples for the given examples) and this seems like a reasonable behavior to me. What do you think?
@SimplyDanny I don't know if you meant the rewrite should keep the trivia or not but it currently keeps them as is (fd15a0d adds examples for the given examples) and this seems like a reasonable behavior to me. What do you think?
The rewrite should keep the trivia. The current example contains an additional comma that's causing tests to pass. Without it (the corrected version), they fail due to comments being removed.
@SimplyDanny I don't know if I am doing something wrong but I cannot figure out why the tests on linux is failing. Do you happen to know what is the issue here?
@SimplyDanny I don't know if I am doing something wrong but I cannot figure out why the tests on linux is failing. Do you happen to know what is the issue here?
A new rule has been enabled in the repository. Simply run IntegrationTests locally. It will fix the issues automatically.
@SimplyDanny rebased onto main and applied the autocorrection from the new rule. Should be good to go!
Well done, @KS1019!