From 4a6e99a8ceb2e9556c3b907f37a01545a4b2f72f Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Fri, 7 Jun 2024 16:21:23 -0700 Subject: [PATCH] Add Periphery (#10) # Add Periphery ## :gear: Release Notes - Add Periphery checks. ### Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md). --- .github/workflows/build-and-test.yml | 5 ++ .periphery.yml | 16 ++++ .reuse/dep5 | 6 ++ TemplateApplication.xcodeproj/project.pbxproj | 27 ++++++ .../project.pbxproj.license | 6 -- .../contents.xcworkspacedata | 7 ++ .../IDEWorkspaceChecks.plist.license | 6 -- .../xcshareddata/swiftpm/Package.resolved | 87 +++++++++++++++++++ .../TemplateApplication.xcscheme.license | 6 -- fastlane/Fastfile | 14 ++- 10 files changed, 161 insertions(+), 19 deletions(-) create mode 100644 .periphery.yml create mode 100644 .reuse/dep5 delete mode 100644 TemplateApplication.xcodeproj/project.pbxproj.license create mode 100644 TemplateApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 TemplateApplication.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist.license create mode 100644 TemplateApplication.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 TemplateApplication.xcodeproj/xcshareddata/xcschemes/TemplateApplication.xcscheme.license diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index bbca661..e2c2a63 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -24,6 +24,11 @@ jobs: swiftlint: name: SwiftLint uses: StanfordBDHG/.github/.github/workflows/swiftlint.yml@v2 + periphery: + name: Periphery + uses: StanfordBDHG/.github/.github/workflows/periphery.yml@v2 + permissions: + contents: read codeql: name: CodeQL uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2 diff --git a/.periphery.yml b/.periphery.yml new file mode 100644 index 0000000..0e19cf1 --- /dev/null +++ b/.periphery.yml @@ -0,0 +1,16 @@ +# +# This source file is part of the StanfordBDHG Template Application project +# +# SPDX-FileCopyrightText: 2023 Stanford University +# +# SPDX-License-Identifier: MIT +# + +project: TemplateApplication.xcodeproj +schemes: +- TemplateApplication +targets: +- TemplateApplication +- TemplateApplicationTests +- TemplateApplicationUITests +- TemplateWatchApplication diff --git a/.reuse/dep5 b/.reuse/dep5 new file mode 100644 index 0000000..18d2125 --- /dev/null +++ b/.reuse/dep5 @@ -0,0 +1,6 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: TemplateApplication.xcodeproj/* +Copyright: 2024 Stanford University and the project authors (see CONTRIBUTORS.md) +License: MIT +Comment: All Xcode Project Configuration Files are part of the StanfordBDHG Template Application project. diff --git a/TemplateApplication.xcodeproj/project.pbxproj b/TemplateApplication.xcodeproj/project.pbxproj index 8d2b4de..250c322 100644 --- a/TemplateApplication.xcodeproj/project.pbxproj +++ b/TemplateApplication.xcodeproj/project.pbxproj @@ -231,6 +231,7 @@ buildRules = ( ); dependencies = ( + 2F310B062C13C87C003761D5 /* PBXTargetDependency */, 2F7025D02A969ACA007C36EF /* PBXTargetDependency */, ); name = TemplateApplication; @@ -273,6 +274,9 @@ Base, ); mainGroup = 371BAA5129EFAB1900011A7C; + packageReferences = ( + 2F310B042C13C873003761D5 /* XCRemoteSwiftPackageReference "SwiftLint" */, + ); productRefGroup = 371BAA5B29EFAB1900011A7C /* Products */; projectDirPath = ""; projectRoot = ""; @@ -356,6 +360,10 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 2F310B062C13C87C003761D5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = 2F310B052C13C87C003761D5 /* SwiftLintBuildToolPlugin */; + }; 2F7025D02A969ACA007C36EF /* PBXTargetDependency */ = { isa = PBXTargetDependency; platformFilter = ios; @@ -796,6 +804,25 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 2F310B042C13C873003761D5 /* XCRemoteSwiftPackageReference "SwiftLint" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/realm/SwiftLint.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 0.55.1; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 2F310B052C13C87C003761D5 /* SwiftLintBuildToolPlugin */ = { + isa = XCSwiftPackageProductDependency; + package = 2F310B042C13C873003761D5 /* XCRemoteSwiftPackageReference "SwiftLint" */; + productName = "plugin:SwiftLintBuildToolPlugin"; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 371BAA5229EFAB1900011A7C /* Project object */; } diff --git a/TemplateApplication.xcodeproj/project.pbxproj.license b/TemplateApplication.xcodeproj/project.pbxproj.license deleted file mode 100644 index 2e5548d..0000000 --- a/TemplateApplication.xcodeproj/project.pbxproj.license +++ /dev/null @@ -1,6 +0,0 @@ - -This source file is part of the StanfordBDHG Template Application project - -SPDX-FileCopyrightText: 2023 Stanford University - -SPDX-License-Identifier: MIT diff --git a/TemplateApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TemplateApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/TemplateApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TemplateApplication.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist.license b/TemplateApplication.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist.license deleted file mode 100644 index 2e5548d..0000000 --- a/TemplateApplication.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist.license +++ /dev/null @@ -1,6 +0,0 @@ - -This source file is part of the StanfordBDHG Template Application project - -SPDX-FileCopyrightText: 2023 Stanford University - -SPDX-License-Identifier: MIT diff --git a/TemplateApplication.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/TemplateApplication.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..98a5a5c --- /dev/null +++ b/TemplateApplication.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,87 @@ +{ + "originHash" : "7a2c9b4bb42c2221bb642dfc27b6e8a478d63cd04f52d3e2819330e24f9fb63f", + "pins" : [ + { + "identity" : "collectionconcurrencykit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/JohnSundell/CollectionConcurrencyKit.git", + "state" : { + "revision" : "b4f23e24b5a1bff301efc5e70871083ca029ff95", + "version" : "0.2.0" + } + }, + { + "identity" : "cryptoswift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/krzyzanowskim/CryptoSwift.git", + "state" : { + "revision" : "c9c3df6ab812de32bae61fc0cd1bf6d45170ebf0", + "version" : "1.8.2" + } + }, + { + "identity" : "sourcekitten", + "kind" : "remoteSourceControl", + "location" : "https://github.com/jpsim/SourceKitten.git", + "state" : { + "revision" : "fd4df99170f5e9d7cf9aa8312aa8506e0e7a44e7", + "version" : "0.35.0" + } + }, + { + "identity" : "swift-argument-parser", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-argument-parser.git", + "state" : { + "revision" : "0fbc8848e389af3bb55c182bc19ca9d5dc2f255b", + "version" : "1.4.0" + } + }, + { + "identity" : "swift-syntax", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-syntax.git", + "state" : { + "revision" : "303e5c5c36d6a558407d364878df131c3546fad8", + "version" : "510.0.2" + } + }, + { + "identity" : "swiftlint", + "kind" : "remoteSourceControl", + "location" : "https://github.com/realm/SwiftLint.git", + "state" : { + "revision" : "b515723b16eba33f15c4677ee65f3fef2ce8c255", + "version" : "0.55.1" + } + }, + { + "identity" : "swiftytexttable", + "kind" : "remoteSourceControl", + "location" : "https://github.com/scottrhoyt/SwiftyTextTable.git", + "state" : { + "revision" : "c6df6cf533d120716bff38f8ff9885e1ce2a4ac3", + "version" : "0.9.0" + } + }, + { + "identity" : "swxmlhash", + "kind" : "remoteSourceControl", + "location" : "https://github.com/drmohundro/SWXMLHash.git", + "state" : { + "revision" : "a853604c9e9a83ad9954c7e3d2a565273982471f", + "version" : "7.0.2" + } + }, + { + "identity" : "yams", + "kind" : "remoteSourceControl", + "location" : "https://github.com/jpsim/Yams.git", + "state" : { + "revision" : "9234124cff5e22e178988c18d8b95a8ae8007f76", + "version" : "5.1.2" + } + } + ], + "version" : 3 +} diff --git a/TemplateApplication.xcodeproj/xcshareddata/xcschemes/TemplateApplication.xcscheme.license b/TemplateApplication.xcodeproj/xcshareddata/xcschemes/TemplateApplication.xcscheme.license deleted file mode 100644 index 2e5548d..0000000 --- a/TemplateApplication.xcodeproj/xcshareddata/xcschemes/TemplateApplication.xcscheme.license +++ /dev/null @@ -1,6 +0,0 @@ - -This source file is part of the StanfordBDHG Template Application project - -SPDX-FileCopyrightText: 2023 Stanford University - -SPDX-License-Identifier: MIT diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 356c1a0..3de03cc 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -59,6 +59,10 @@ platform :ios do run_tests( skip_build: true, derived_data_path: ".derivedData", + xcargs: [ + "-skipPackagePluginValidation", + "-skipMacroValidation" + ], code_coverage: true, devices: options[:devices], force_quit_simulator: true, @@ -78,7 +82,11 @@ platform :ios do build_app( skip_archive: true, skip_codesigning: true, - derived_data_path: ".derivedData" + derived_data_path: ".derivedData", + xcargs: [ + "-skipPackagePluginValidation", + "-skipMacroValidation" + ] ) end @@ -86,6 +94,10 @@ platform :ios do lane :build do build_app( derived_data_path: ".derivedData", + xcargs: [ + "-skipPackagePluginValidation", + "-skipMacroValidation" + ], destination: "generic/platform=iOS", output_directory: ".build", archive_path: ".build/TemplateApplication.xcarchive",