X Tutup
Skip to content

Commit 2ce9e95

Browse files
committed
docs(DEVELOPER.md): update info about clang-format setup
There is no need to recommend installing clang-format globally.
1 parent 49e261e commit 2ce9e95

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

DEVELOPER.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,7 @@ Your life will be easier if you include the formatter in your standard workflow.
249249
likely forget to check the formatting, and waste time waiting for a build on Travis that fails due
250250
to some whitespace difference.
251251

252-
* Install clang-format with `npm install -g clang-format`.
253-
* Use `clang-format -i [file name]` to format a file (or multiple).
254-
Note that `clang-format` tries to load a `clang-format` node module close to the sources being
255-
formatted, or from the `$CWD`, and only then uses the globally installed one - so the version used
256-
should automatically match the one required by the project.
257-
Use `clang-format -version` in case you get confused.
252+
* Use `$(npm bin)/clang-format -i [file name]` to format a file (or multiple).
258253
* Use `gulp enforce-format` to check if your code is `clang-format` clean. This also gives
259254
you a command line to format your code.
260255
* `clang-format` also includes a git hook, run `git clang-format` to format all files you
@@ -276,7 +271,7 @@ to some whitespace difference.
276271
- Synchronize files after execution: checked
277272
- Open console: not checked
278273
- Show in: Editor menu
279-
- Program: [path to clang-format, try `$ echo $(npm config get prefix)/bin/clang-format`]
274+
- Program: `$ProjectFileDir$/node_modules/.bin/clang-format`
280275
- Parameters: `-i -style=file $FilePath$`
281276
- Working directory: `$ProjectFileDir$`
282277
* `clang-format` integrations are also available for many popular editors (`vim`, `emacs`,

0 commit comments

Comments
 (0)
X Tutup