[#164] Makefile: Add clang-format support
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
af5f29e1ff
commit
709706da0d
1 changed files with 1 additions and 14 deletions
15
Makefile
15
Makefile
|
@ -76,20 +76,7 @@ lint:
|
||||||
$(LINT_DIR)/golangci-lint run --timeout=5m
|
$(LINT_DIR)/golangci-lint run --timeout=5m
|
||||||
|
|
||||||
clang:
|
clang:
|
||||||
@if [ ! -d "$(OUTPUT_LINT_DIR)/clang" ]; then \
|
@clang-format -i **/*.js
|
||||||
make clang-install; \
|
|
||||||
fi
|
|
||||||
# @$(OUTPUT_LINT_DIR)/clang/clang-format -i **/*.js
|
|
||||||
|
|
||||||
clang-install:
|
|
||||||
@mkdir -p $(TMP_DIR)/llvm
|
|
||||||
@curl -L -o $(TMP_DIR)/llvm/llv-$(LLVM_VERSION)-linux-x64.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-$(LLVM_VERSION)/LLVM-$(LLVM_VERSION)-Linux-X64.tar.xz
|
|
||||||
@mkdir -p $(OUTPUT_LINT_DIR)/clang
|
|
||||||
@tar -xJf $(TMP_DIR)/llvm/llv-$(LLVM_VERSION)-linux-x64.tar.xz --strip-components=2 -C $(OUTPUT_LINT_DIR)/clang LLVM-$(LLVM_VERSION)-Linux-X64/bin/clang-format
|
|
||||||
@rm -r $(TMP_DIR) 2>/dev/null || true
|
|
||||||
|
|
||||||
llvm-version:
|
|
||||||
@echo $(LLVM_VERSION)
|
|
||||||
|
|
||||||
# Install linters
|
# Install linters
|
||||||
lint-install:
|
lint-install:
|
||||||
|
|
Loading…
Reference in a new issue