mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 15:06:33 +01:00
0da144f4d4
This patch adds a `make format-cpp` shortcut to the Makefile that runs clang-format on the C++ diffs, and a `make format-cpp-build` to install clang-format from npm. 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 ``` Most of the .clang-format file comes from running ``` $ clang-format --dump-config --style=Google ``` with clang-format built with llvm/trunk 328768 (npm version 1.2.3) The clang-format version is fixed because different version of clang-format may format the files differently. PR-URL: https://github.com/nodejs/node/pull/21997 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michaël Zasso <targos@protonmail.com>
138 lines
2.0 KiB
Plaintext
138 lines
2.0 KiB
Plaintext
# Whitelist dotfiles
|
|
.*
|
|
!deps/**/.*
|
|
!test/fixtures/**/.*
|
|
!tools/node_modules/**/.*
|
|
!tools/doc/node_modules/**/.*
|
|
!.clang-format
|
|
!.editorconfig
|
|
!.eslintignore
|
|
!.eslintrc.js
|
|
!.gitattributes
|
|
!.github
|
|
!.gitignore
|
|
!.gitkeep
|
|
!.mailmap
|
|
!.nycrc
|
|
!.remarkrc
|
|
!.travis.yml
|
|
|
|
core
|
|
vgcore.*
|
|
v8*.log
|
|
perf.data
|
|
perf.data.old
|
|
.waf*
|
|
tags
|
|
.lock-wscript
|
|
*.pyc
|
|
doc/api.xml
|
|
tmp/
|
|
test/tmp*/
|
|
iojs
|
|
iojs_g
|
|
node
|
|
node_g
|
|
*.swp
|
|
.benchmark_reports
|
|
icu_config.gypi
|
|
.eslintcache
|
|
node_trace.*.log
|
|
coverage/
|
|
|
|
/out
|
|
|
|
# various stuff that VC++ produces/uses
|
|
Debug/
|
|
!**/node_modules/debug/
|
|
!deps/v8/src/debug/
|
|
Release/
|
|
!doc/blog/**
|
|
*.sln
|
|
!nodemsi.sln
|
|
*.suo
|
|
*.vcproj
|
|
*.vcxproj
|
|
!custom_actions.vcxproj
|
|
*.vcxproj.user
|
|
*.vcxproj.filters
|
|
UpgradeLog*.XML
|
|
_UpgradeReport_Files/
|
|
ipch/
|
|
*.sdf
|
|
*.opensdf
|
|
*.VC.db
|
|
*.VC.opendb
|
|
.vs/
|
|
.vscode/
|
|
/deps/v8/src/debug/obj
|
|
/*.exe
|
|
|
|
/config.mk
|
|
/config.gypi
|
|
/config.status
|
|
/config_fips.gypi
|
|
*-nodegyp*
|
|
/gyp-mac-tool
|
|
/npm.wxs
|
|
/tools/msvs/npm.wixobj
|
|
/tools/msvs/genfiles/
|
|
/test/addons/??_*/
|
|
email.md
|
|
deps/v8-*
|
|
deps/icu
|
|
deps/icu*.zip
|
|
deps/icu*.tgz
|
|
deps/icu-tmp
|
|
./node_modules
|
|
android-toolchain/
|
|
.svn/
|
|
|
|
# generated by gyp on Windows
|
|
deps/openssl/openssl.props
|
|
deps/openssl/openssl.targets
|
|
deps/openssl/openssl.xml
|
|
|
|
# generated by gyp on android
|
|
/*.target.mk
|
|
/*.host.mk
|
|
deps/openssl/openssl.target.mk
|
|
deps/zlib/zlib.target.mk
|
|
|
|
# not needed and causes issues for distro packagers
|
|
deps/npm/node_modules/.bin/
|
|
|
|
# build/release artifacts
|
|
/*.tar.*
|
|
/*.pkg
|
|
/SHASUMS*.txt*
|
|
|
|
# api docs artifacts
|
|
tools/doc/node_modules
|
|
|
|
# test artifacts
|
|
tools/remark-cli/node_modules
|
|
tools/remark-preset-lint-node/node_modules
|
|
icu_config.gypi
|
|
*.tap
|
|
|
|
# Xcode workspaces and project folders
|
|
*.xcodeproj
|
|
*.xcworkspace
|
|
|
|
# libuv book and GitHub template
|
|
deps/uv/.github/
|
|
deps/uv/docs/code/
|
|
deps/uv/docs/src/guide/
|
|
|
|
# do not override V8's .gitignore
|
|
!deps/v8/**
|
|
# ignore VS compiler output unhandled by V8's .gitignore
|
|
deps/v8/gypfiles/Debug/
|
|
deps/v8/gypfiles/Release/
|
|
deps/v8/src/Debug/
|
|
deps/v8/src/Release/
|
|
deps/v8/src/inspector/Debug/
|
|
deps/v8/src/inspector/Release/
|
|
deps/v8/third_party/eu-strip/
|