We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please describe the rule idea, format this issue's title as Rule Request: [Rule Name] and describe:
Rule Request: [Rule Name]
I think we should have a rule that triggers when someone writes a do-catch, and leaves the catch empty. Cases like this should just use try?
do-catch
catch
try?
Bad
do { try doStuff() } catch { }
Good
do { try doStuff() } catch { Logger().error("\(error.localizedDescription)") }
no configuration needed
I think this should be enabled by default, although I can understand the amount of noise that might cause for existing projects.
The text was updated successfully, but these errors were encountered:
no_empty_block
This could become a part of the new rule introduced in #5617 or a dedicate rule.
Sorry, something went wrong.
No branches or pull requests
New Issue Checklist
New rule request
Please describe the rule idea, format
this issue's title as
Rule Request: [Rule Name]
and describe:the community thinks about this.
I think we should have a rule that triggers when someone writes a
do-catch
, and leaves thecatch
empty. Cases like this should just usetry?
Bad
Good
no configuration needed
See README.md for guidelines on when to mark a rule as opt-in.
I think this should be enabled by default, although I can understand the amount of noise that might cause for existing projects.
The text was updated successfully, but these errors were encountered: