Periphery Versions Save

A tool to identify unused code in Swift projects.

2.18.0

3 months ago
Breaking
  • The command-line parsing strategy for options that were delimited by a pipe or comma has changed. These options are now parsed as a space delimited list, e.g --option "arg1" "arg2".
  • The option --external-encodable-protocols is deprecated, use --external-codable-protocols instead.
Enhancements
  • Add experimental unused import analysis option --enable-unused-import-analysis.
  • Add experimental automatic code removal option --auto-remove.
  • Assign-only properties on structs with synthesized initializers are now detected.
  • Added the --retain-codable-properties option to retain all properties on Codable types.
  • Results for redundant protocol conformances will now list the inherited protocols that should replace the redundant conformance, if any.
  • Added the --retain-files option to retain all declarations within the given files.
Bug Fixes
  • Subscript functions required by @dynamicMemberLookup are now retained.
  • A newline is no longer printed before non-Xcode formatted results.
  • --external-codable-protocols now retains enums that conform to CodingKey.
  • Fix public accessibility false-positive for actors.
  • Fix public accessibility false-positive for property wrappers.
  • Fix public accessibility false-positive for declarations referenced from a public @inlinable function.
  • Fix public accessibility false-positive for function parameter default values.
  • Fix public accessibility false-positive for inherited and default associated types.
  • Fix public accessibility false-positive for generic types used in the generic argument clause of a return type.
  • Fix public accessibility false-positive for retained/ignored declarations.
  • Fix public accessibility false-positive for enum case parameter types.
  • Fix public accessibility false-positive for properties initialized with generic specialized types.
  • Types associated with assign-only properties are no longer identified as unused until the property is removed.
  • Classes referenced in Info.plist as NSPrincipalClass and WKExtensionDelegateClassName are now retained.

2.17.1

4 months ago

2.17.1

Breaking
  • None.
Enhancements
  • Add support for indexing plist files via the generic --file-targets-path option.
Bug Fixes
  • None.

2.17.0

5 months ago

2.17.0

Breaking
  • None.
Enhancements
  • Added the --relative-results option to output result paths relative to the current directory.
  • --quiet now silences warnings too.
Bug Fixes
  • Fix redundant public accessibility analysis for protocol members declared in extensions that are referenced cross-module where the protocol itself is not.
  • Remove checks causing errors when scanning multi-platform projects.
  • Additional arguments passed through to xcodebuild/swift are now quoted automatically as needed.

2.16.0

6 months ago

2.16.0

Breaking
  • None.
Enhancements
  • SwiftUI previews (PreviewProvider) are no longer retained by default. Retain them with --retain-swift-ui-previews.
Bug Fixes
  • Fix retaining members of public generic protocol extensions with --retain-public.

2.15.1

7 months ago

2.15.1

Breaking
  • None.
Enhancements
  • Swift 5.9 support.
Bug Fixes
  • Path forward slashes in JSON output formats are no longer escaped.
  • INDEX_ENABLE_DATA_STORE is now forcefully enabled as it's required for indexing in some cases.

2.15.0

9 months ago

2.15.0

Breaking
  • Swift 5.7 and macOS 12 are no longer supported.
Enhancements
  • Reduced indexing and analysis runtime by ~60%.
Bug Fixes
  • Fix indexing multi-platform projects such as those containing watchOS extensions.
  • Subclasses of CLKComplicationPrincipalClass referenced from an Info.plist are now retained.

2.14.1

9 months ago

2.14.1

Breaking
  • None.
Enhancements
  • None.
Bug Fixes
  • Revert SwiftPM binary command plugin. Sorry folks, but SwiftPM doesn't provide the appropriate permissions for Periphery to build projects in the sandbox.

2.14.0

9 months ago

2.14.0

Breaking
  • None.
Enhancements
  • Add the --retain-objc-annotated option.
  • Added support for SwiftPM binary command plugin.
Bug Fixes
  • None.

2.13.0

11 months ago
Breaking
  • None.
Enhancements
  • Improve indexing performance when multiple index stores are provided.
  • Added --external-test-case-classes option to allow external types to be treated as XCTestCase subclasses.
  • Comment commands now support trailing comments, e.g // periphery:ignore - explanation of why this is necessary
Bug Fixes
  • Fix handling of relative paths in --file-targets-path.
  • Fix redundant public accessibility false positives when --retain-objc-accessible is enabled.

2.12.3

1 year ago
Breaking
  • None.
Enhancements
  • None.
Bug Fixes
  • Fix index/report exclude regression.