Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periphery marks as warning SwiftUI's "preview" methods #769

Closed
ukushu opened this issue Jul 12, 2024 · 1 comment
Closed

Periphery marks as warning SwiftUI's "preview" methods #769

ukushu opened this issue Jul 12, 2024 · 1 comment
Labels
needs investigation Bug report that needs confirmation

Comments

@ukushu
Copy link

ukushu commented Jul 12, 2024

#Preview {
    @Previewable @State var value = true
    return SpecialButton(isOn: $value)
}
struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

both of them is OK that they are not used, they must not be marked as "warning/unused"

@ukushu ukushu changed the title Marks as warning SwiftUI's "preview" method Periphery marks as warning SwiftUI's "preview" methods Jul 12, 2024
@ileitch ileitch added the needs investigation Bug report that needs confirmation label Jul 14, 2024
@sjavora
Copy link

sjavora commented Aug 27, 2024

There is the --retain-swift-ui-previews option - have you tried that?

@ukushu ukushu closed this as completed Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation Bug report that needs confirmation
Projects
None yet
Development

No branches or pull requests

3 participants