-
-
Notifications
You must be signed in to change notification settings - Fork 227
Private IBAction is reported as unused in SPM #1089
Copy link
Copy link
Open
Labels
needs investigationBug report that needs confirmationBug report that needs confirmation
Description
Describe the bug
Private IBAction methods inside an SPM module are incorrectly reported as unused by Periphery
The issue reproduces on the latest version (3.6.0)
Steps to reproduce
-
Use Periphery 3.6.0
-
Analyze an SPM module containing a UIViewController with IBAction methods
-
Observe that private IBActions connected via Interface Builder are flagged as unused
Minimal reproducible example:
https://github.com/SmallRedGollum/PeripheryIBActionWarning/blob/main/Sources/PeripheryIBActionWarning/ViewController.swift
Scan
periphery scan --config "./periphery.yml" --skip-build --index-store-path "/path/DerivedData/PeripheryIBActionWarning/Index.noindex/DataStore"
Output
/path/PeripheryIBActionWarning/ViewController.swift:17:28: warning: Unused function 'onButtonDidTap()'
/path/PeripheryIBActionWarning/ViewController.swift:30:20: warning: Unused function 'onButtonDidTap2()'
Expected behavior
Private IBAction methods connected in Interface Builder should not be reported as unused
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs investigationBug report that needs confirmationBug report that needs confirmation