Support VSCode swiftlint extension

This commit is contained in:
Kabir Oberai
2025-06-01 13:46:41 +05:30
Unverified
parent 0425f9edeb
commit cb3e095f04
6 changed files with 24 additions and 10 deletions
+1 -1
View File
@@ -12,4 +12,4 @@ DerivedData/
.docc-build
/openapi
/tmp
/.tmp
+5 -2
View File
@@ -64,7 +64,10 @@ function_parameter_count: 7
implicit_return:
included:
- closure
included:
- Package.swift
- Sources
- Tests
- macOS/XToolMac
excluded:
- .build
- macOS/Build
- Sources/DeveloperAPI/Generated
+1
View File
@@ -0,0 +1 @@
/launch.json
+6
View File
@@ -0,0 +1,6 @@
{
"recommendations": [
"swiftlang.swift-vscode",
"vknabel.vscode-swiftlint",
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"swiftlint.path": "./.tmp/swiftlint/swiftlint",
}
+8 -7
View File
@@ -127,7 +127,7 @@ docs-preview:
./Documentation/build.sh preview
SWIFTLINT_VERSION = $(shell head -1 .swiftlint.yml | cut -d' ' -f2)
SWIFTLINT_BIN = tmp/swiftlint/swiftlint-$(SWIFTLINT_VERSION)
SWIFTLINT_BIN = .tmp/swiftlint/swiftlint-$(SWIFTLINT_VERSION)
SWIFTLINT_URL = https://github.com/realm/SwiftLint/releases/download/$(SWIFTLINT_VERSION)/$(if $(IS_MAC),portable_swiftlint,swiftlint_linux).zip
.PHONY: lint
@@ -135,12 +135,13 @@ lint: $(SWIFTLINT_BIN)
$(SWIFTLINT_BIN) $(SWIFTLINT_FLAGS)
$(SWIFTLINT_BIN):
@rm -rf tmp/swiftlint
@mkdir -p tmp/swiftlint
curl -fSL $(SWIFTLINT_URL) -o tmp/swiftlint/swiftlint.zip
unzip -q tmp/swiftlint/swiftlint.zip swiftlint -d tmp/swiftlint
@rm -f tmp/swiftlint/swiftlint.zip
@mv tmp/swiftlint/swiftlint $@
@rm -rf .tmp/swiftlint
@mkdir -p .tmp/swiftlint
curl -fSL $(SWIFTLINT_URL) -o .tmp/swiftlint/swiftlint.zip
unzip -q .tmp/swiftlint/swiftlint.zip swiftlint -d .tmp/swiftlint
@rm -f .tmp/swiftlint/swiftlint.zip
@mv .tmp/swiftlint/swiftlint $@
@ln -s swiftlint-$(SWIFTLINT_VERSION) .tmp/swiftlint/swiftlint
SPEC_URL = https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip