Skip to content
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

SwiftLint not run with Swift package #160

Open
yo1995 opened this issue Oct 5, 2021 · 3 comments
Open

SwiftLint not run with Swift package #160

yo1995 opened this issue Oct 5, 2021 · 3 comments

Comments

@yo1995
Copy link
Contributor

yo1995 commented Oct 5, 2021

image

I spotted some linter warnings from the toolkit source files. I realized that with the Swift package manifest setup, it is different than an Xcode project file where we can place a shell script in its Build Phases. Is this already taken into consideration?

One of the linter warning example ⚠️ Closure Opening Space Violation: Use one space between the brace and bracket. (closure_opening_space)

rotationObservation = mapView.observe(\.rotation, options: .new) {[weak self] (_, change) in

@mhdostal
Copy link
Member

mhdostal commented Oct 6, 2021

@yo1995 That's currently a known issue, because, as you noted, there are no longer "Build Phases" in which to run the linter. The recommendation is to run the linter by hand until we come up with an automated solution. I will add an item to our internal release process to run the linter and fix issues before a release. Thanks!

@yo1995
Copy link
Contributor Author

yo1995 commented Oct 6, 2021

Sounds good. It's worth keeping an eye on this proposal: realm/SwiftLint#3679 that comes with Swift 5.6 which might sorta address this issue.

@yo1995
Copy link
Contributor Author

yo1995 commented Jun 6, 2022

Today in Sate of the Union they introduced https://www.hackingwithswift.com/swift/5.6/swiftpm-plugins Swift Package Plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants