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: docs/pages/developer_guide.md
+26-11Lines changed: 26 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,19 +72,13 @@ Steps required to visualize a new block with svZeroDSolver Visualization applica
72
72
73
73
# Code Style
74
74
75
-
We follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).
76
-
77
-
## Formatting {#formatting}
78
-
79
-
We use [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to automatically
80
-
format our code accoring to the [Google Style](https://google.github.io/styleguide/cppguide.html),
81
-
as specified in the `.clang-format` file. This increases readability and maintainability of the code
75
+
We use automatic code formatting for certain files to increase readability and maintainability of the code
82
76
while enabling you to focus on coding.
83
77
84
-
There are tools for your favorite IDE to automatically format your code. Examples are:
85
-
-[Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=xaver.clang-format)
86
-
-[vim](https://github.com/rhysd/vim-clang-format)
87
-
-[and many more](https://clang.llvm.org/docs/ClangFormat.html)
78
+
## Formatting {#formatting}
79
+
The following files are automatically formatted:
80
+
-Source code (`.cpp, .h`): [clang-format](https://clang.llvm.org/docs/ClangFormat.html) as specified in `.clang-format` (defaults to [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html))
81
+
-Test cases and results (`.json`): [Prettier](https://prettier.io/) as specified in `.prettierrc`
88
82
89
83
Before formatting the code with clang-format, ensure that you have latest clang-format version by running `clang-format --version`. To upgrade `clang-format` use the following commands
90
84
* on MacOS: `brew upgrade clang-format`
@@ -117,6 +111,27 @@ requirements.
117
111
118
112
On Sherlock at Stanford, clang-format is included in the `llvm` module.
119
113
114
+
## Visual Studio Code
115
+
Install the [clang-format](https://marketplace.visualstudio.com/items?itemName=xaver.clang-format) and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) plugins. To automatically format your files on save, add to your user settings (on macOS, press `Cmd+Shift+P`, type "Preferences: Open User Settings (JSON)")
0 commit comments