Skip to content

Commit

Permalink
Simplify SwiftFormat Invocations (#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdmontgomery authored Feb 11, 2025
2 parents 38d3755 + a684644 commit 9d25fac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 1 addition & 5 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ steps:
plugins:
- docker#v5.12.0:
image: "ghcr.io/nicklockwood/swiftformat:$SWIFTFORMAT_VERSION"
command: ["--lint", "Sources"]
workdir: "${BUILDKITE_BUILD_CHECKOUT_PATH}"
- docker#v5.12.0:
image: "ghcr.io/nicklockwood/swiftformat:$SWIFTFORMAT_VERSION"
command: ["--lint", "Tests"]
command: ["Sources", "Tests", "--lint"]
workdir: "${BUILDKITE_BUILD_CHECKOUT_PATH}"
notify:
- github_commit_status:
Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ setup-secrets: bundle-install
bundle exec fastlane run configure_apply

swiftformat: check-docker # Automatically find and fixes lint issues
@docker run --rm -v $(shell pwd):$(shell pwd) -w $(shell pwd) ghcr.io/nicklockwood/swiftformat:$(SWIFTFORMAT_VERSION) Sources
@docker run --rm -v $(shell pwd):$(shell pwd) -w $(shell pwd) ghcr.io/nicklockwood/swiftformat:$(SWIFTFORMAT_VERSION) Tests
@docker run --rm -v $(shell pwd):$(shell pwd) -w $(shell pwd) ghcr.io/nicklockwood/swiftformat:$(SWIFTFORMAT_VERSION) Sources Tests

swiftformat-lint: check-docker
@docker run --rm -v $(shell pwd):$(shell pwd) -w $(shell pwd) ghcr.io/nicklockwood/swiftformat:$(SWIFTFORMAT_VERSION) --lint Sources
@docker run --rm -v $(shell pwd):$(shell pwd) -w $(shell pwd) ghcr.io/nicklockwood/swiftformat:$(SWIFTFORMAT_VERSION) --lint Tests
@docker run --rm -v $(shell pwd):$(shell pwd) -w $(shell pwd) ghcr.io/nicklockwood/swiftformat:$(SWIFTFORMAT_VERSION) Sources Tests --lint

swiftlint: docker-swiftlint-builder swiftlint-run # Sets up the buildx builder and runs the swiftlint command

Expand Down

0 comments on commit 9d25fac

Please sign in to comment.