Skip to content

armgit / xtool

Public Imported from GitHub
0

Cross-platform Xcode replacement. Build and deploy iOS apps with SwiftPM on Linux, Windows, macOS.

Support VSC swiftlint extension (#108)

Kabir Oberai0d19aa6f0466
diff --git a/.gitignore b/.gitignore
index 49a0693..0fefab9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,4 @@ DerivedData/
.docc-build
/openapi
-/tmp
+/.tmp
diff --git a/.swiftlint.yml b/.swiftlint.yml
index e685069..35d6181 100644
--- a/.swiftlint.yml
+++ b/.swiftlint.yml
@@ -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
diff --git a/.vscode/.gitignore b/.vscode/.gitignore
new file mode 100644
index 0000000..0ae318e
--- /dev/null
+++ b/.vscode/.gitignore
@@ -0,0 +1 @@
+/launch.json
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..e13d027
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,6 @@
+{
+ "recommendations": [
+ "swiftlang.swift-vscode",
+ "vknabel.vscode-swiftlint",
+ ]
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..7d36857
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "swiftlint.path": "./.tmp/swiftlint/swiftlint",
+}
diff --git a/Makefile b/Makefile
index edd2f9f..565ebbf 100644
--- a/Makefile
+++ b/Makefile
@@ -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