Automate Swift lint using jenkins

I want to automate Swift lint process using jenkins, ie when merge request is sent first it has to run swiftlint along with build if there is error and warnings it should fail. Is there any swiftlint plugin that jenkins support or any method to run the swiftlint file when merge request is triggered

Ensure SwiftLint is installed on the Jenkins machine. You can install it using Homebrew with the command brew install swiftlint. In your Jenkins job configuration, add a build step to execute shell commands. MyIndigoCard To fail the build on warnings or errors, you can use the --strict flag with SwiftLint, which will cause SwiftLint to return a non-zero exit code for warnings as well as errors.