You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DEVELOPER.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,21 +197,34 @@ Angular specific command line options when running protractor (e.g. force gc, ..
197
197
198
198
## Formatting
199
199
200
-
We use [clang-format](http://clang.llvm.org/docs/ClangFormat.html) to automatically enforce code style for our TypeScript code. This allows us to focus our code reviews more on the content, and less on style nit-picking. It also lets us encode our style guide in the `.clang-format` file in the repository, allowing many tools and editors to share our settings.
200
+
We use [clang-format](http://clang.llvm.org/docs/ClangFormat.html) to automatically enforce code style for our TypeScript code.
201
+
This allows us to focus our code reviews more on the content, and less on style nit-picking.
202
+
It also lets us encode our style guide in the `.clang-format` file in the repository,
203
+
allowing many tools and editors to share our settings.
201
204
202
205
To check the formatting of your code, run
203
206
204
207
gulp check-format
205
208
206
-
Note that the continuous build on Travis runs `gulp enforce-format`. Unlike the `check-format` task, this will actually fail the build if files aren't formatted according to the style guide.
209
+
Note that the continuous build on Travis runs `gulp enforce-format`.
210
+
Unlike the `check-format` task, this will actually fail the build if files aren't formatted according to the style guide.
207
211
208
-
Your life will be easier if you include the formatter in your standard workflow. Otherwise, you'll likely forget to check the formatting, and waste time waiting for a build on Travis that fails due to some whitespace difference.
212
+
Your life will be easier if you include the formatter in your standard workflow.
213
+
Otherwise, you'll likely forget to check the formatting,
214
+
and waste time waiting for a build on Travis that fails due to some whitespace difference.
This will automatically format your delta regions when you commit a change.
219
+
To install, first patch this file to add `.ts` to the `default_extensions` section.
220
+
Then copy the file somewhere in your path, for example, `/usr/local/git/current/bin/git-clang-format`.
221
+
Make sure it is executable. Then, in the angular repo, run
209
222
210
-
***git pre-commit hook** is available at [llvm.org](https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/git-clang-format). This will automatically format your delta regions when you commit a change. To install, first patch this file to add `.ts` to the `default_extensions` section. Then copy the file somewhere in your path, for example, `/usr/local/git/current/bin/git-clang-format`. Make sure it is executable. Then, in the angular repo, run
0 commit comments