From d5e37210cc6eeb3e4c86a037c81330f0d0b2939b Mon Sep 17 00:00:00 2001 From: legendecas Date: Fri, 4 Dec 2020 07:23:08 +0800 Subject: [PATCH] tools: print more instructions on clang-format check failed (#846) PR-URL: https://github.com/nodejs/node-addon-api/pull/846 Reviewed-By: Michael Dawson --- tools/clang-format.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/clang-format.js b/tools/clang-format.js index 3a2ba4a2f..026728b5c 100644 --- a/tools/clang-format.js +++ b/tools/clang-format.js @@ -33,7 +33,11 @@ function main(args) { console.error(clangFormatOutput); const fixCmd = '"npm run lint:fix"'; console.error(` - ERROR: please run ${fixCmd} to format changes in your commit`); + ERROR: please run ${fixCmd} to format changes in your commit + Note that when running the command locally, please keep your local + master branch and working branch up to date with nodejs/node-addon-api + to exclude un-related complains. + Or you can run "env CLANG_FORMAT_START=upstream/master ${fixCmd}".`); return 1; } }