ladvoc / BijectiveDictionary

A specialized dictionary structure offering bijective mapping and bidirectional O(1) access.
https://jacobgelman.com/posts/swift-bijective-dictionary
MIT License
2 stars 1 forks source link

Install and configure SwiftLint #10

Closed ladvoc closed 1 week ago

ladvoc commented 1 week ago

To maintain consistency across the codebase, I have installed SwiftLint as a package plugin. I have added an initial configuration for .swiftlint.yml which mostly uses the default rules. I think the defaults are generally good, but I am open to suggestions. This PR is not ready to be merged.

DandyLyons commented 1 week ago

Thanks for setting this up. I'm not picky about linting rules. The default rules should be fine.

ladvoc commented 1 week ago

SwiftLint currently only offers a binary through SwiftPM for macOS, so I have updated the package manifests to include it conditionally. It is invoked in the macOS CI workflow.

DandyLyons commented 1 week ago

Is it not possible to keep deploying to macOS 10.15? It seems strange to lose so much backwards compatibility just for a dev tool.

DandyLyons commented 1 week ago

If you’re okay with dropping that backwards compatibility, then I approve this.

I suspect there’s gotta be a way that we could have SwiftLint and not have to lose backwards compatibility. Since SwiftLint is a core tool that has been around a long time.

ladvoc commented 1 week ago

Yes, SwiftLint depends on macOS v12 when used as a package plug-in:

The package product 'SwiftLintBuildToolPlugin' requires minimum platform version 12.0 for the macOS platform, but this target supports 10.15

It is also possible to use SwiftLint as a standalone tool or with editor configuration, but I like tying it into the build process so it doesn't require additional setup. However, I also agree that dropping support for macOS 10.15 might not be a good tradeoff. Let me know your thoughts on this.

DandyLyons commented 1 week ago

I don’t want this to be a blocker for us. If it takes us a while to figure out how to keep legacy macOS then maybe we just drop them for now and hopefully come back to it later.