{"id":15634926,"url":"https://github.com/lukepistrol/swiftlintplugin","last_synced_at":"2026-01-05T20:05:21.455Z","repository":{"id":38318445,"uuid":"506530286","full_name":"lukepistrol/SwiftLintPlugin","owner":"lukepistrol","description":"A Swift Package Plugin for SwiftLint","archived":false,"fork":false,"pushed_at":"2025-01-16T23:38:25.000Z","size":49,"stargazers_count":134,"open_issues_count":0,"forks_count":26,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-28T08:06:07.569Z","etag":null,"topics":["build-tool-plugin","command-plugin","package-manager","plugin","spm","swift","swift5","swiftlint","swiftpackagemanager","xcode","xcode14"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukepistrol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"lukepistrol","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["buymeacoffee.com/lukeeep"]}},"created_at":"2022-06-23T06:56:16.000Z","updated_at":"2025-03-17T06:14:18.000Z","dependencies_parsed_at":"2024-05-17T07:30:57.808Z","dependency_job_id":"97671b02-f883-47b6-b1d3-aa465978fd9b","html_url":"https://github.com/lukepistrol/SwiftLintPlugin","commit_stats":{"total_commits":54,"total_committers":4,"mean_commits":13.5,"dds":"0.14814814814814814","last_synced_commit":"87454f5c9ff4d644086aec2a0df1ffba678e7f3c"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepistrol%2FSwiftLintPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepistrol%2FSwiftLintPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepistrol%2FSwiftLintPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepistrol%2FSwiftLintPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukepistrol","download_url":"https://codeload.github.com/lukepistrol/SwiftLintPlugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149501,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-tool-plugin","command-plugin","package-manager","plugin","spm","swift","swift5","swiftlint","swiftpackagemanager","xcode","xcode14"],"created_at":"2024-10-03T10:59:06.356Z","updated_at":"2026-01-05T20:05:16.424Z","avatar_url":"https://github.com/lukepistrol.png","language":"Swift","funding_links":["https://github.com/sponsors/lukepistrol","buymeacoffee.com/lukeeep","https://www.buymeacoffee.com/lukeeep"],"categories":[],"sub_categories":[],"readme":"# SwiftLintPlugin\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Flukepistrol%2FSwiftLintPlugin%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/lukepistrol/SwiftLintPlugin)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Flukepistrol%2FSwiftLintPlugin%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/lukepistrol/SwiftLintPlugin)\n[![](https://img.shields.io/github/license/lukepistrol/SwiftLintPlugin)](https://github.com/lukepistrol/SwiftLintPlugin/blob/main/LICENSE)\n[![Twitter: @lukeeep_](https://img.shields.io/badge/Twitter-@lukeeep_-1e9bf0.svg?style=flat)](https://twitter.com/lukeeep_)\n\nA Swift Package Plugin for [SwiftLint](https://github.com/realm/SwiftLint/) that will run SwiftLint on build time and show errors \u0026 warnings in Xcode.\n\n\u003e **Note** \n\u003e There now is an official version in the [SwiftLint repo](https://github.com/realm/SwiftLint#plug-in-support)!\n\u003e Though this package will still be maintained and updated since it brings the benefit of being a smaller repository and\n\u003e therefore faster to download as a dependency\n\n## Add to Package\n\nFirst add a dependency from this package:\n\n```swift\ndependencies: [\n    // ...\n    .package(url: \"https://github.com/lukepistrol/SwiftLintPlugin\", from: \"0.2.2\"),\n]\n```\n\nThen add it to your targets as a plugin:\n\n```swift\ntargets: [\n    .target(\n        name: \"YOUR_TARGET\",\n        dependencies: [],\n        plugins: [\n            .plugin(name: \"SwiftLint\", package: \"SwiftLintPlugin\")\n        ]\n    ),\n]\n```\n\n## Add to Project\n\nStarting with Xcode 14, plugins can also work on Xcode Project's targets. To do so, simply add this package to your SPM dependencies in Xcode. After that open your `target's settings \u003e Build Phases` and add `SwiftLint` to `Run Build Tool Plug-ins` like shown below:\n\n\u003cimg width=\"285\" alt=\"Screen Shot 2022-09-02 at 09 33 23\" src=\"https://user-images.githubusercontent.com/9460130/188084164-49903dc4-39a4-42fc-aa6f-6c6a813a7239.png\"\u003e\n\n\u003e You may need to enable \u0026 trust the plugin before you can actually run it during builds.\n\n## Fix Warnings\n\nAs of version `0.1.0` this package also includes a command plugin which can be called on any target.\n\n1. Select a project or package in the project navigator.\n2. Richt-click and select `SwiftLintFix`.\n   - alternatively you can select `File \u003e Packages \u003e SwiftLintFix`.\n3. Choose the target(s) to run the `swiftlint --fix` command on.\n\n\u003cimg width=\"224\" alt=\"Screenshot 2022-10-31 at 12 59 53\" src=\"https://user-images.githubusercontent.com/9460130/199005629-b214758f-e184-4b3b-8031-e6364c6549c7.png\"\u003e\n\n## Run on CI\n\nImportant to notice is that when building a package/project on any CI provider (e.g. GitHub Actions) it is mandatory to pass the `-skipPackagePluginValidation` flag to the `xcodebuild` command. This will skip the validation prompt which in Xcode looks like this:\n\n\u003cimg width=\"263\" alt=\"Screenshot 2022-12-13 at 17 48 44\" src=\"https://user-images.githubusercontent.com/9460130/207394170-9490e687-e066-4bfa-862c-a4f816b6b43b.png\"\u003e\n\n### Example\n\n```bash\nxcodebuild  \\\n    -scheme \"$SCHEME\" \\\n    -destination \"$PLATFORM\" \\\n    -skipPackagePluginValidation \\ # this is mandatory\n    clean build\n```\n\nIf you need to disable linting (for release/app store builds), you can set`DISABLE_SWIFTLINT` environment variable\n\n-----\n\n\u003ca href=\"https://www.buymeacoffee.com/lukeeep\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukepistrol%2Fswiftlintplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukepistrol%2Fswiftlintplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukepistrol%2Fswiftlintplugin/lists"}