Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redundant_discardable_let should not produce warning when used with async #4142

Closed
2 tasks done
mhosna opened this issue Aug 29, 2022 · 3 comments
Closed
2 tasks done

Comments

@mhosna
Copy link
Contributor

mhosna commented Aug 29, 2022

New Issue Checklist

Describe the bug

let can not be removed from "async let _ = await foo()" because removing it produces invalid swift syntax

$ swiftlint lint

Produces:

Redundant Discardable Let Violation: Prefer `_ = foo()` over `let _ = foo()` when discarding a result from a function. (redundant_discardable_let)

Environment

  • SwiftLint version 0.48.0

Example for RedundantDiscardableLetRule test case:

Example("async let _ = await foo()")

Fix:

return file.match(pattern: "(?<!async\\s)let\\s+_\\b", with: [.keyword, .keyword]).filter { range in
@mhosna
Copy link
Contributor Author

mhosna commented Aug 29, 2022

#4143

some tasks ended with error:
ERROR: Failed to query remote execution capabilities: UNAUTHENTICATED: no authentication metadata found
not sure what that mean..

@jpsim jpsim closed this as completed Aug 29, 2022
@jpsim
Copy link
Collaborator

jpsim commented Aug 29, 2022

@mhosna thanks for the report & fix, the unauthenticated error was unrelated to your work, I was making some changes to our CI infrastructure and things were temporarily broken.

@mhosna
Copy link
Contributor Author

mhosna commented Aug 29, 2022

@jpsim thank you for the merge!

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

No branches or pull requests

2 participants