diff --git a/.github/workflows/Lint.yml b/.github/workflows/Lint.yml new file mode 100644 index 00000000..4e10a765 --- /dev/null +++ b/.github/workflows/Lint.yml @@ -0,0 +1,14 @@ +name: Lint +on: + push: + branches-ignore: + - main + +jobs: + Lint: + runs-on: macos-14 + steps: + - uses: actions/checkout@v3 + - name: SwiftFormat + run: | + swiftformat --lint . --swiftversion 6.0 --reporter github-actions-log diff --git a/Package.swift b/Package.swift index 74aaff61..914b5fcf 100644 --- a/Package.swift +++ b/Package.swift @@ -5,11 +5,10 @@ import PackageDescription let gccIncludePrefix = "/usr/local/playdate/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1" -let playdateSDKPath: String -if let path = Context.environment["PLAYDATE_SDK_PATH"] { - playdateSDKPath = path +let playdateSDKPath: String = if let path = Context.environment["PLAYDATE_SDK_PATH"] { + path } else { - playdateSDKPath = "\(Context.environment["HOME"]!)/Developer/PlaydateSDK/" + "\(Context.environment["HOME"]!)/Developer/PlaydateSDK/" } let package = Package( diff --git a/README.md b/README.md index fad9dbb2..0529a6c3 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,9 @@ final class Game: PlaydateGame { } ``` +## Contributing +I'm happy to accept contributions on this project, whether it's bug fixes, implementing missing features, or opening an issue. Please try to follow the existing conventions/style in the project. Code should be formatted before merge using `swiftformat . --swiftversion 6.0`, but I can run this before merging if you don't want to install `swiftformat`. + ## Acknowledgements PlaydateKit was inspired by and would not be possible without the excellent work done by [@rauhul](https://github.com/rauhul) on [swift-playdate-examples](https://github.com/apple/swift-playdate-examples). Specifically, PlaydateKit was created due to the note in the swift-playdate-examples repo: