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

Remove some settings causing compilation errors and reduce other annoying warnings #652

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jeden
Copy link
Contributor

@jeden jeden commented Dec 11, 2024

Related Issue

N/A

Summary of Changes

Removed settings causing compilation errors and reduced other annoying warnings

Need Regression Testing

  • Yes
  • No

Risk Assessment

  • Low
  • Medium
  • High

Additional Notes

This PR does not affect the app from a functional standpoint, it's all about the Swift Linter

Screenshots (if applicable)

N/A

- no_space_in_method_call
- multiple_closures_with_trailing_closure
- switch_case_alignment
- syntactic_sugar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think disable those rules are good practices

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think disable those rules are good practices

The first 5 cause compilation to fail in the current code, so keeping them means refactoring.

  • no_space_in_method_call causes warnings reported on cases where a function takes a closure and it's called without parenthesis, for example: DispatchQueue.main.async {
  • line_length I personally tend to ignore it, as in some cases I prefer a longer line to splits
  • switch_case_alignment seems to randomly throw warnings even if cases are aligned correctly
  • syntactic_sugar: I find this annoying, as sometimes I prefer to make the code more explicit by avoiding syntactic sugar — typically in some usages of optionals, or when defining extensions.

Anyway it seems nobody but me has the linter enabled, as it causes compilation to fail.

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.

2 participants