diff --git a/.gitignore b/.gitignore index bc986b3c4c0659..f72c6d73a20b4a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ # Exclude specific dotfiles that we want to track. !deps/**/.* !test/fixtures/**/.* -!.clang-format !.cpplint !.editorconfig !.eslintignore @@ -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 diff --git a/Makefile b/Makefile index 4aace77c7c8c63..53df48fbddd22a 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/tools/clang-format/package-lock.json b/tools/clang-format/package-lock.json deleted file mode 100644 index 61f17967f0e4a5..00000000000000 --- a/tools/clang-format/package-lock.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "name": "node-core-clang-format", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "clang-format": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/clang-format/-/clang-format-1.2.3.tgz", - "integrity": "sha512-x90Hac4ERacGDcZSvHKK58Ga0STuMD+Doi5g0iG2zf7wlJef5Huvhs/3BvMRFxwRYyYSdl6mpQNrtfMxE8MQzw==", - "requires": { - "async": "^1.5.2", - "glob": "^7.0.0", - "resolve": "^1.1.6" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "requires": { - "path-parse": "^1.0.5" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - } - } -} diff --git a/tools/clang-format/package.json b/tools/clang-format/package.json deleted file mode 100644 index 8432296ed6f1fc..00000000000000 --- a/tools/clang-format/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "node-core-clang-format", - "version": "1.0.0", - "description": "Formatting C++ files for Node.js core", - "license": "MIT", - "dependencies": { - "clang-format": "1.2.3" - } -}