You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran a static analysis on the Apollo and ApolloSQLite targets and found the following. PR to clean these up incoming:
Static analysis warnings
Sources/Apollo/GraphQLHTTPMethod.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/Apollo/Collection+Helpers.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/Apollo/PossiblyDeferred.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/Apollo/NormalizedCache.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/Apollo/SelectionSet+JSONInitializer.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/Apollo/GraphQLSelectionSetMapper.swift:5:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/Apollo/RequestChain.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/Apollo/RequestBodyCreator.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/Apollo/InMemoryNormalizedCache.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/Apollo/DataLoader.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/Apollo/HTTPURLResponse+Helpers.swift:8:7: error: Unused Declaration Violation: Declarations should be referenced at least once within all files linted (unused_declaration)
Sources/Apollo/DispatchQueue+Optional.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/Apollo/GraphQLResult.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/ApolloAPI/InputValue.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/ApolloAPI/LocalCacheMutation.swift:39:5: error: Unused Declaration Violation: Declarations should be referenced at least once within all files linted (unused_declaration)
Sources/ApolloAPI/LocalCacheMutation.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/ApolloAPI/DataDict.swift:35:5: error: Unused Declaration Violation: Declarations should be referenced at least once within all files linted (unused_declaration)
Sources/ApolloAPI/DataDict.swift:45:5: error: Unused Declaration Violation: Declarations should be referenced at least once within all files linted (unused_declaration)
Sources/ApolloAPI/JSON.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/ApolloAPI/GraphQLNullable.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/ApolloAPI/AnyHashableConvertible.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/ApolloAPI/Selection.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Sources/ApolloAPI/Selection+Conditions.swift:1:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
/Sources/ApolloSQLite/SQLiteSerialization.swift:2:1: warning: Unused Import Violation: All imported modules should be required to make the file compile (unused_import)
Methodology:
First, I created a .swiftlint.yml analysis configuration:
I ran a static analysis on the
Apollo
andApolloSQLite
targets and found the following. PR to clean these up incoming:Static analysis warnings
Methodology:
First, I created a
.swiftlint.yml
analysis configuration:Then, I ran the following commands:
And repeated for
ApolloSQLite
Note that
swiftlint analyze
registers_modify
blocks as unused declarations. I've opened up an issue about that.The text was updated successfully, but these errors were encountered: