Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools,src: remove clang-format #42665

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# Exclude specific dotfiles that we want to track.
!deps/**/.*
!test/fixtures/**/.*
!.clang-format
!.cpplint
!.editorconfig
!.eslintignore
Expand Down Expand Up @@ -111,7 +110,6 @@ tools/*/*.i.tmp
!**/node_modules/**
/node_modules
/tools/doc/node_modules
/tools/clang-format/node_modules

# === Rules for test artifacts ===
/*.tap
Expand Down
30 changes: 0 additions & 30 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1414,36 +1414,6 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
# and the actual filename is generated so it won't match header guards
ADDON_DOC_LINT_FLAGS=-whitespace/ending_newline,-build/header_guard

.PHONY: format-cpp-build
format-cpp-build:
cd tools/clang-format && $(call available-node,$(run-npm-ci))

.PHONY: format-cpp-clean
.NOTPARALLEL: format-cpp-clean
format-cpp-clean:
$(RM) -r tools/clang-format/node_modules

CLANG_FORMAT_START ?= HEAD
.PHONY: format-cpp
# To format staged changes:
# $ make format-cpp
# To format HEAD~1...HEAD (latest commit):
# $ CLANG_FORMAT_START=`git rev-parse HEAD~1` make format-cpp
# To format diff between master and current branch head (master...HEAD):
# $ CLANG_FORMAT_START=master make format-cpp
format-cpp: ## Format C++ diff from $CLANG_FORMAT_START to current changes
ifneq ("","$(wildcard tools/clang-format/node_modules/)")
$(info Formatting C++ diff from $(CLANG_FORMAT_START)..)
@$(PYTHON) tools/clang-format/node_modules/.bin/git-clang-format \
--binary=tools/clang-format/node_modules/.bin/clang-format \
--style=file \
$(CLANG_FORMAT_START) -- \
$(LINT_CPP_FILES)
else
$(info clang-format is not installed.)
$(info To install (requires internet access) run: $$ make format-cpp-build)
endif

ifeq ($(V),1)
CPPLINT_QUIET =
else
Expand Down
113 changes: 0 additions & 113 deletions tools/clang-format/package-lock.json

This file was deleted.

9 changes: 0 additions & 9 deletions tools/clang-format/package.json

This file was deleted.