microsoft / FluentDarkModeKit

A library for backporting Dark Mode in iOS
MIT License
1.63k stars 125 forks source link

Bundle SwiftLint inside the project? #73

Closed icodesign closed 4 years ago

icodesign commented 4 years ago

Currently the project replies on SwiftLint within our own development environment. There're some issues around it:

  1. You need install SwiftLint before writing any code. Some people may not know how it works and it will cost some time.
  2. Not all developers are using same version of SwiftLint which could potentially cause conflicts.

I'm wondering if we could bundle SwiftLint inside our project via CocoaPods, Carthage or just a binary?

levinli303 commented 4 years ago

Bundling SwiftLint shouldn't be hard as I see SwiftLint itself provides multiple ways to integrate it.

I'm not very fond of the idea though, I think of using SwiftLint here as a way to control the format and quality of the code that we take in, it is a requirement for code contributors rather than the majority of users of this library, and we probably wanted contributors to follow our set of rules.

For the two issues:

  1. Maybe it is better we can provide a CONTRIBUTING.mdfor this purpose
  2. I am not sure but I think since we have a SwiftLint rule file, it should be compatible with different versions unless there is breaking change in SwiftLint? Personally I would prefer stay up to date with the latest version available.
icodesign commented 4 years ago

Hey Levin, I just want to make it clear that "bundling" here is not meant to ship SwiftLint binary to our end users. Instead, it's just for contributors, so that all contributors are using a same version.

levinli303 commented 4 years ago

I just want to make it clear that "bundling" here is not meant to ship SwiftLint binary to our end users. Instead, it's just for contributors, so that all contributors are using a same version.

Yeah I think I got it right, I meant our developer users instead of end users. I do not think our developer users really care about linting, while contributors should, that's the reason why I do not find it very necessary.

icodesign commented 4 years ago

Anyway, I think we can set this aside since CI will check lint.