0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

swiftlint makefile

Last updated at Posted at 2025-03-12

terminal上コマンド
make lint
make branch_lint

Makefile

.PHONY: lint
lint: 
    @FILES=$$(git diff HEAD --name-only | grep '\.swift$$'); \
    if [ -n "$$FILES" ]; then \
        echo "$$FILES" | xargs swiftlint --fix --format; \
    else \
        echo "no Swift files changed"; \
    fi


.PHONY: branch_lint
branch_lint:
    @FILES=$$(git diff HEAD origin/develop --name-only | grep '\.swift$$'); \
    if [ -n "$$FILES" ]; then \
        echo "$$FILES" | xargs swiftlint --fix --format; \
    else \
        echo "no Swift files changed"; \
    fi
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?