codeandtheory / ynetwork-ios

A networking layer for iOS and tvOS.
Apache License 2.0
3 stars 3 forks source link

Fix SwiftLint configuration warnings #7

Closed mpospese closed 1 year ago

mpospese commented 1 year ago

Intro

The unused_import rule is not actually being enforced because it runs during the analysis phase and not during the build phase. (And I've tried running it as part of analysis and even then it doesn't work: if you satisfy the rule when analyzing the package, then imports are missing when trying to use the package.)

The current lint run warns about this rule not being run. We should just remove it.

Also the anyobject_protocol warning is now enforced by Xcode itself and so no longer needs to be checked with SwiftLint. Again we should just remove it.

warning: 'unused_import' should be listed in the 'analyzer_rules' configuration section for more clarity as it is only run by 'swiftlint analyze'
The `anyobject_protocol` rule is now deprecated and will be completely removed in a future release.

Task