I added SwiftLint plugin to my project by following below steps.
You can integrate SwiftLint as a Xcode Build Tool Plug-in if you're working with a project in Xcode.
Add SwiftLint as a package dependency to your project without linking any of the products.
Select the target you want to add linting to and open the Build Phases inspector. Open Run Build Tool Plug-ins and select the + button. Select SwiftLintPlugin from the list and add it to the project.
I got "Trust and Enable all" dialogue when run my project very firsttime after adding the SwiftLint plugin to the build tool.
This dialog protects you from malicious upstream packages that try to run code on your machine as part of the build process. It’s analogous to the warning you get when opening a .xcodeproj you downloaded from the Internet.
However, it seems to be happening when executing UI Tests via xcbuild test with the result of an early failure; is there a way to trust it via the command-line?