mastodon-ios icon indicating copy to clipboard operation
mastodon-ios copied to clipboard

Add SwiftLint and SwiftFormat but with no settings

Open dalemyers opened this issue 1 year ago • 5 comments

The purpose of this change is to introduce the tools and show that they have no effect with all rules disabled. The rules that are chosen can be very contentious in any developer community, so this PR deliberately avoids having any turned on and instead just enables the tools so that rules can be handled in later PRs.

dalemyers avatar Nov 10 '22 18:11 dalemyers

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 10 '22 18:11 CLAassistant

Here's an example PR which could come later that has a ton of change: https://github.com/dalemyers/mastodon-ios/pull/1/files

dalemyers avatar Nov 10 '22 18:11 dalemyers

I know your example just removes the duplicates, but seeing 562 Files changed in a PR gives me anxiety. Joking aside, like the idea of SwiftLint though - 👍🏼

Yonodactyl avatar Nov 10 '22 19:11 Yonodactyl

Agreed. That's why I wanted to add the tools with no rules and then add them one at a time. 500+ files is a nightmare PR, but since its just a very small change, in this case ordering imports, then each change only takes a second or two to review, making this a 10-20 minute PR.

It's not ideal, but it's the best option going forward I feel.

dalemyers avatar Nov 10 '22 19:11 dalemyers

I'm with you on this, @dalemyers Small improvements make big improvements

Yonodactyl avatar Nov 10 '22 19:11 Yonodactyl

@dalemyers thank you for the PR, I like SwiftLint as well but as you already noted it would be a huge undertaking, and currently there is a lot of flux in this Repo, also only having SwiftLint without any rules enabled would add maintenance cost without bringing real benefit. I'm going to close this PR for now and we're going to internally talk about this topic and decide on which SwiftLint rules we're going to want to use.

kimar avatar Nov 21 '22 15:11 kimar