peripheryapp / periphery

A tool to identify unused code in Swift projects.
MIT License
5.26k stars 193 forks source link

Periphery 3.0.0Beta4 contains Analysis of files in DerivedData #809

Closed Lutzifer closed 2 months ago

Lutzifer commented 2 months ago

Periphery 3.0.0Beta4 adds a lot of results that come out of the derivedData Folder:

/Users/admin/Library/Developer/Xcode/DerivedData/AppTemplate-cnigsvtswcvhvwgctpcxmfomtkoh/SourcePackages/checkouts/Alamofire/Source/Alamofire.swift warning: Property 'version' is declared public, but not used outside of Alamofire
/Users/admin/Library/Developer/Xcode/DerivedData/AppTemplate-cnigsvtswcvhvwgctpcxmfomtkoh/SourcePackages/checkouts/Alamofire/Source/Core/AFError.swift warning: Property 'acceptableContentTypes' is unused
/Users/admin/Library/Developer/Xcode/DerivedData/AppTemplate-cnigsvtswcvhvwgctpcxmfomtkoh/SourcePackages/checkouts/Alamofire/Source/Core/AFError.swift warning: Property 'bytesExpected' is assigned, but never used
(more than 1k similar lines)

at the moment, we filter this using grep -v DerivedData.

If this is an intentional change: is there a way to directly filter it in Peripheral?

Our Config:

report_exclude:
  - '**/*generated*.swift'
  - '**/*grpc*.swift'
  - '**/*pb*.swift'
schemes:
  - ProjectKit
  - ProjectName
  - ProjectKitUnitTests
  - ProjectNameUnitTests
  - ProjectNameUITests
skip_build: true
targets:
  - ProjectKit
  - ProjectName
  - ProjectKitUnitTests
  - ProjectNameUnitTests
  - ProjectNameUITests
verbose: false
quiet: true
project: ProjectName.xcodeproj

We call it using

bin/mint run --no-install periphery scan --index-store-path "$INDEX_STORE_PATH"