Skip to content

Commit 97514bb

Browse files
authored
Fix actions for external PRs (#70)
## Description Attempts to fix lint action failures in external PRs. Also checks in some vscode settings. ## Type of Change - [x] Bug fix - [ ] New feature - [ ] Breaking change - [ ] Documentation update ## Additional Notes Add any other context or screenshots about the pull request here.
1 parent 2b0239c commit 97514bb

File tree

9 files changed

+36
-9
lines changed

9 files changed

+36
-9
lines changed

.github/workflows/format.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ jobs:
2727
- name: Checkout for external PR
2828
if: ${{ github.event.pull_request.head.repo.owner.login != github.repository_owner }}
2929
uses: actions/checkout@v4
30-
with:
31-
ref: ${{ github.head_ref }}
3230

3331
- name: Install swift-format
3432
run: brew install swift-format

.vscode/launch.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"configurations": [
3+
{
4+
"type": "swift",
5+
"request": "launch",
6+
"args": [],
7+
"cwd": "${workspaceFolder:swift-json-schema}",
8+
"name": "Debug JSONSchemaClient",
9+
"program": "${workspaceFolder:swift-json-schema}/.build/debug/JSONSchemaClient",
10+
"preLaunchTask": "swift: Build Debug JSONSchemaClient"
11+
},
12+
{
13+
"type": "swift",
14+
"request": "launch",
15+
"args": [],
16+
"cwd": "${workspaceFolder:swift-json-schema}",
17+
"name": "Release JSONSchemaClient",
18+
"program": "${workspaceFolder:swift-json-schema}/.build/release/JSONSchemaClient",
19+
"preLaunchTask": "swift: Build Release JSONSchemaClient"
20+
}
21+
]
22+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
@attached(peer) public macro ExcludeFromSchema() =
1+
@attached(peer)
2+
public macro ExcludeFromSchema() =
23
#externalMacro(module: "JSONSchemaMacro", type: "ExcludeFromSchemaMacro")

Sources/JSONSchemaBuilder/Macros/SchemaOptions/SchemaOptions.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import JSONSchema
22

3-
@attached(peer) public macro SchemaOptions(
3+
@attached(peer)
4+
public macro SchemaOptions(
45
title: String? = nil,
56
description: String? = nil,
67
default: JSONValue? = nil,

Sources/JSONSchemaBuilder/Macros/SchemaOptions/TypeSpecific/ArrayOptions.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import JSONSchema
22

3-
@attached(peer) public macro ArrayOptions(
3+
@attached(peer)
4+
public macro ArrayOptions(
45
minContains: Int? = nil,
56
maxContains: Int? = nil,
67
minItems: Int? = nil,

Sources/JSONSchemaBuilder/Macros/SchemaOptions/TypeSpecific/NumberOptions.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import JSONSchema
22

3-
@attached(peer) public macro NumberOptions(
3+
@attached(peer)
4+
public macro NumberOptions(
45
multipleOf: Double? = nil,
56
minimum: Double? = nil,
67
exclusiveMinimum: Bool? = nil,
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import JSONSchema
22

3-
@attached(peer) public macro ObjectOptions(
3+
@attached(peer)
4+
public macro ObjectOptions(
45
minProperties: Int? = nil,
56
maxProperties: Int? = nil
67
) = #externalMacro(module: "JSONSchemaMacro", type: "ObjectOptionsMacro")

Sources/JSONSchemaBuilder/Macros/SchemaOptions/TypeSpecific/StringOptions.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import JSONSchema
22

3-
@attached(peer) public macro StringOptions(
3+
@attached(peer)
4+
public macro StringOptions(
45
minLength: Int? = nil,
56
maxLength: Int? = nil,
67
pattern: String? = nil,

Sources/JSONSchemaBuilder/Macros/Schemable.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
@attached(extension, conformances: Schemable) @attached(member, names: named(schema))
1+
@attached(extension, conformances: Schemable)
2+
@attached(member, names: named(schema))
23
public macro Schemable() = #externalMacro(module: "JSONSchemaMacro", type: "SchemableMacro")
34

45
public protocol Schemable {

0 commit comments

Comments
 (0)