Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

Commit 1c4b4fb

Browse files
authored
version 0.0.1 (#1)
1 parent 65137fb commit 1c4b4fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1192
-1
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
xcuserdata/
5+
DerivedData/
6+
.swiftpm/configuration/registries.json
7+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
8+
.netrc
9+
.swiftpm/xcode/xcshareddata/xcschemes/swift-plugins-Package.xcscheme

Makefile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
SHELL=/bin/bash
2+
3+
checks: breakage language symlinks deps lint
4+
5+
breakage:
6+
swift package --disable-sandbox check-api-breakage
7+
8+
symlinks:
9+
swift package --disable-sandbox check-broken-symlinks
10+
11+
deps:
12+
swift package --disable-sandbox check-local-swift-dependencies
13+
14+
security:
15+
swift package --disable-sandbox check-openapi-security
16+
17+
validation:
18+
swift package --disable-sandbox check-openapi-validation
19+
20+
language:
21+
swift package --disable-sandbox check-unacceptable-language
22+
23+
contributors:
24+
swift package --disable-sandbox generate-contributors-list
25+
26+
install-format:
27+
swift package --disable-sandbox install-swift-format
28+
29+
install-openapi:
30+
swift package --disable-sandbox install-swift-openapi-generator
31+
32+
run-clean:
33+
swift package --disable-sandbox run-clean
34+
35+
server:
36+
swift package --disable-sandbox run-openapi-server
37+
38+
lint:
39+
swift package --disable-sandbox run-swift-format
40+
41+
format:
42+
swift package --disable-sandbox run-swift-format --fix
43+

Package.swift

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
// swift-tools-version: 5.9
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "swift-plugins",
6+
platforms: [
7+
.macOS(.v10_15),
8+
],
9+
products: [
10+
.plugin(name: "CheckApiBreakagePlugin", targets: ["CheckApiBreakagePlugin"]),
11+
.plugin(name: "CheckBrokenSymlinksPlugin", targets: ["CheckBrokenSymlinksPlugin"]),
12+
.plugin(name: "CheckLocalSwiftDependenciesPlugin", targets: ["CheckLocalSwiftDependenciesPlugin"]),
13+
.plugin(name: "CheckOpenApiSecurityPlugin", targets: ["CheckOpenApiSecurityPlugin"]),
14+
.plugin(name: "CheckOpenApiValidationPlugin", targets: ["CheckOpenApiValidationPlugin"]),
15+
.plugin(name: "CheckUnacceptableLanguagePlugin", targets: ["CheckUnacceptableLanguagePlugin"]),
16+
.plugin(name: "GenerateContributorsListPlugin", targets: ["GenerateContributorsListPlugin"]),
17+
.plugin(name: "InstallSwiftFormatPlugin", targets: ["InstallSwiftFormatPlugin"]),
18+
.plugin(name: "InstallSwiftOpenApiGeneratorPlugin", targets: ["InstallSwiftOpenApiGeneratorPlugin"]),
19+
.plugin(name: "RunCleanPlugin", targets: ["RunCleanPlugin"]),
20+
.plugin(name: "RunOpenApiServerPlugin", targets: ["RunOpenApiServerPlugin"]),
21+
.plugin(name: "RunSwiftFormatPlugin", targets: ["RunSwiftFormatPlugin"]),
22+
],
23+
dependencies: [],
24+
targets: [
25+
.plugin(
26+
name: "CheckApiBreakagePlugin",
27+
capability: .command(
28+
intent: .custom(
29+
verb: "check-api-breakage",
30+
description: "runs check-api-breakage.sh"
31+
)
32+
),
33+
dependencies: []
34+
),
35+
.plugin(
36+
name: "CheckBrokenSymlinksPlugin",
37+
capability: .command(
38+
intent: .custom(
39+
verb: "check-broken-symlinks",
40+
description: "runs check-broken-symlinks.sh"
41+
)
42+
),
43+
dependencies: []
44+
),
45+
.plugin(
46+
name: "CheckLocalSwiftDependenciesPlugin",
47+
capability: .command(
48+
intent: .custom(
49+
verb: "check-local-swift-dependencies",
50+
description: "runs check-local-swift-dependencies.sh"
51+
)
52+
),
53+
dependencies: []
54+
),
55+
.plugin(
56+
name: "CheckOpenApiSecurityPlugin",
57+
capability: .command(
58+
intent: .custom(
59+
verb: "check-openapi-security",
60+
description: "runs check-openapi-security.sh"
61+
)
62+
),
63+
dependencies: []
64+
),
65+
.plugin(
66+
name: "CheckOpenApiValidationPlugin",
67+
capability: .command(
68+
intent: .custom(
69+
verb: "check-openapi-validation",
70+
description: "runs check-openapi-validation.sh"
71+
)
72+
),
73+
dependencies: []
74+
),
75+
.plugin(
76+
name: "CheckUnacceptableLanguagePlugin",
77+
capability: .command(
78+
intent: .custom(
79+
verb: "check-unacceptable-language",
80+
description: "runs check-unacceptable-language.sh"
81+
)
82+
),
83+
dependencies: []
84+
),
85+
.plugin(
86+
name: "GenerateContributorsListPlugin",
87+
capability: .command(
88+
intent: .custom(
89+
verb: "generate-contributors-list",
90+
description: "runs generate-contributors-list.sh"
91+
)
92+
),
93+
dependencies: []
94+
),
95+
.plugin(
96+
name: "InstallSwiftFormatPlugin",
97+
capability: .command(
98+
intent: .custom(
99+
verb: "install-swift-format",
100+
description: "runs install-swift-format.sh"
101+
)
102+
),
103+
dependencies: []
104+
),
105+
.plugin(
106+
name: "InstallSwiftOpenApiGeneratorPlugin",
107+
capability: .command(
108+
intent: .custom(
109+
verb: "install-swift-openapi-generator",
110+
description: "runs install-swift-openapi-generator.sh"
111+
)
112+
),
113+
dependencies: []
114+
),
115+
.plugin(
116+
name: "RunCleanPlugin",
117+
capability: .command(
118+
intent: .custom(
119+
verb: "run-clean",
120+
description: "runs run-clean.sh"
121+
)
122+
),
123+
dependencies: []
124+
),
125+
.plugin(
126+
name: "RunOpenApiServerPlugin",
127+
capability: .command(
128+
intent: .custom(
129+
verb: "run-openapi-server",
130+
description: "runs run-openapi-server.sh"
131+
)
132+
),
133+
dependencies: []
134+
),
135+
.plugin(
136+
name: "RunSwiftFormatPlugin",
137+
capability: .command(
138+
intent: .custom(
139+
verb: "run-swift-format",
140+
description: "runs run-swift-format.sh"
141+
)
142+
),
143+
dependencies: []
144+
),
145+
]
146+
)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// CheckApiBreakagePlugin.swift
3+
//
4+
// Created by gerp83 on 05/06/2024
5+
//
6+
7+
import PackagePlugin
8+
9+
@main
10+
struct CheckApiBreakagePlugin: CommandPlugin {
11+
12+
func performCommand(
13+
context: PackagePlugin.PluginContext,
14+
arguments: [String]
15+
) async throws {
16+
try context.runScript(CheckApiBreakageScript())
17+
}
18+
19+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../Shared
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// CheckBrokenSymlinksPlugin.swift
3+
//
4+
// Created by gerp83 on 05/06/2024
5+
//
6+
7+
import PackagePlugin
8+
9+
@main
10+
struct CheckBrokenSymlinksPlugin: CommandPlugin {
11+
12+
func performCommand(
13+
context: PackagePlugin.PluginContext,
14+
arguments: [String]
15+
) async throws {
16+
try context.runScript(CheckBrokenSymlinksScript())
17+
}
18+
19+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../Shared
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// CheckLocalSwiftDependenciesPlugin.swift
3+
//
4+
// Created by gerp83 on 05/06/2024
5+
//
6+
7+
import PackagePlugin
8+
9+
@main
10+
struct CheckLocalSwiftDependenciesPlugin: CommandPlugin {
11+
12+
func performCommand(
13+
context: PackagePlugin.PluginContext,
14+
arguments: [String]
15+
) async throws {
16+
try context.runScript(CheckLocalSwiftDependenciesScript())
17+
}
18+
19+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../Shared
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// CheckOpenApiSecurityPlugin.swift
3+
//
4+
// Created by gerp83 on 07/06/2024
5+
//
6+
7+
import PackagePlugin
8+
9+
@main
10+
struct CheckOpenApiSecurityPlugin: CommandPlugin {
11+
12+
func performCommand(
13+
context: PackagePlugin.PluginContext,
14+
arguments: [String]
15+
) async throws {
16+
try context.runScript(CheckOpenApiSecurityScript())
17+
}
18+
19+
}

0 commit comments

Comments
 (0)