realm / SwiftLint

A tool to enforce Swift style and conventions.
https://realm.github.io/SwiftLint
MIT License
18.58k stars 2.21k forks source link

Swiftlint is breaking SwiftUI Previews when used as plugin in SPM package. #5693

Open agruchala opened 1 month ago

agruchala commented 1 month ago

New Issue Checklist

Describe the bug

Swiftlint is breaking SwiftUI Previews when used as plugin in SPM package.

When Swiftlint is added as plugin to package, previews engine generates this error:

== PREVIEW UPDATE ERROR:

    HumanReadableSwiftError

    BuildError: failedToGenerateThunkInfo(could not generate preview info: noTargetBuildGraph)

Without plugin, previews works fine.

SimplyDanny commented 1 month ago

This does rather sound like an issue of SwiftUI Previews than an issue of SwiftLint.