Skip to content

[CM-757] Create a SwiftLint Plugin for a Swift Package #2

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

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

timthehelipilot
Copy link
Contributor

Introduction

Add SwiftLint plugin to Swift Package.

Purpose

In order to see warnings and errors in Xcode when using SwiftLint in a Swift Package, we need to create a plugin that will run the SwiftLint tool at build time. This PR creates a plugin that will do that by using the SwiftLint binary. Using the binary instead of pulling in the SwiftLint package as a dependency will reduce the build time. In the future, we could pull this out into its own package to be used in all our swift packages. This is possible today but there are issues in Xcode that prevent it from reliably showing warnings in Xcode. This is being resolved in Xcode 14 and should be out in the Fall
Screen Shot 2022-07-21 at 8 00 45 AM
.

@timthehelipilot timthehelipilot self-assigned this Jul 21, 2022
@timthehelipilot timthehelipilot requested a review from mpospese July 21, 2022 15:21
@mpospese mpospese requested a review from PanchamiShenoy July 21, 2022 15:50
Copy link
Contributor

@mpospese mpospese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it! Works both when you open the package in Xcode or when you build it from the sample app. 👍

@mpospese mpospese merged commit 4be001c into main Jul 22, 2022
@mpospese mpospese deleted the feature/CM-757-create-swiftlint-plugin branch July 22, 2022 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants