Skip to content

Commit

Permalink
Basic structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Oct 14, 2023
1 parent eef8193 commit 46e50b6
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install XCBeautify
run: brew install xcbeautify
- name: Test platform ${{ matrix.destination }}
run: set -o pipefail && xcodebuild -scheme xclint -destination "${{ matrix.destination }}" test | xcbeautify --renderer github-actions
run: set -o pipefail && xcodebuild -scheme XCLint-Package -destination "${{ matrix.destination }}" test | xcbeautify --renderer github-actions

linux_test:
name: Test Linux
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.DS_Store
/.build
/Packages
xcuserdata/
DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
50 changes: 50 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"pins" : [
{
"identity" : "aexml",
"kind" : "remoteSourceControl",
"location" : "https://github.com/tadija/AEXML.git",
"state" : {
"revision" : "38f7d00b23ecd891e1ee656fa6aeebd6ba04ecc3",
"version" : "4.6.1"
}
},
{
"identity" : "pathkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kylef/PathKit.git",
"state" : {
"revision" : "3bfd2737b700b9a36565a8c94f4ad2b050a5e574",
"version" : "1.0.1"
}
},
{
"identity" : "spectre",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kylef/Spectre.git",
"state" : {
"revision" : "26cc5e9ae0947092c7139ef7ba612e34646086c7",
"version" : "0.10.1"
}
},
{
"identity" : "xcconfig",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattmassicotte/XCConfig",
"state" : {
"branch" : "main",
"revision" : "26059718eab7a4fa723dd75cde45cf099d3e75a8"
}
},
{
"identity" : "xcodeproj",
"kind" : "remoteSourceControl",
"location" : "https://github.com/tuist/XcodeProj",
"state" : {
"revision" : "3797181813ee963fe305d939232bc576d23ddbb0",
"version" : "8.15.0"
}
}
],
"version" : 2
}
33 changes: 33 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// swift-tools-version: 5.9

import PackageDescription

let package = Package(
name: "XCLint",
platforms: [.macOS(.v13)],
products: [
.executable(name: "xclint", targets: ["clitool"]),
// I'd prefer to name this "XCLint", but it seems like Xcode cannot handle two products with the same name, even if they differ in case
.library(name: "XCLinting", targets: ["XCLinting"]),
],
dependencies: [
.package(url: "https://github.com/tuist/XcodeProj", from: "8.15.0"),
.package(url: "https://github.com/mattmassicotte/XCConfig", branch: "main"),
],
targets: [
.executableTarget(name: "clitool", dependencies: ["XCLinting"]),
.target(name: "XCLinting", dependencies: ["XCConfig", "XcodeProj"]),
.testTarget(name: "XCLintTests", dependencies: ["XCLinting"]),

]
)

let swiftSettings: [SwiftSetting] = [
.enableExperimentalFeature("StrictConcurrency")
]

for target in package.targets {
var settings = target.swiftSettings ?? []
settings.append(contentsOf: swiftSettings)
target.swiftSettings = settings
}
2 changes: 2 additions & 0 deletions Sources/XCLinting/File.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
public struct XCLintThing {
}
4 changes: 4 additions & 0 deletions Sources/clitool/main.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// The Swift Programming Language
// https://docs.swift.org/swift-book

print("Hello, world!")
7 changes: 7 additions & 0 deletions Tests/XCLintTests/XCLintTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import XCTest
import XCLint

Check failure on line 2 in Tests/XCLintTests/XCLintTests.swift

View workflow job for this annotation

GitHub Actions / Test (platform=macOS)

no such module 'XCLint'

final class XCLintTests: XCTestCase {
func testExample() throws {
}
}

0 comments on commit 46e50b6

Please sign in to comment.