nudles commented on a change in pull request #4: Add google-style in
clang-formatter
URL: https://github.com/apache/singa-doc/pull/4#discussion_r381051344
##########
File path: docs-site/docs/contribute-code.md
##########
@@ -19,16 +19,26 @@ A simple way to enforce the Google coding styles is to use
the linting and forma
Once the extensions are installed, edit the `settings.json` file.
```json
-"[cpp]": {
- "editor.defaultFormatter": "xaver.clang-format"
-},
-"cpplint.cpplintPath": "path/to/cpplint",
-
-"editor.formatOnSave": true,
-"python.formatting.provider": "yapf",
-"python.linting.enabled": true,
-"python.linting.lintOnSave": true,
+{
+ "[cpp]": {
+ "editor.defaultFormatter": "xaver.clang-format"
+ },
+ "cpplint.cpplintPath": "path/to/cpplint",
+
+ "editor.formatOnSave": true,
+ "python.formatting.provider": "yapf",
+ "python.linting.enabled": true,
+ "python.linting.lintOnSave": true,
+ "clang-format.language.cpp.style": "google",
+ "python.formatting.yapfArgs" : ["--style" , "{based_on_style: google}" ]
+}
```
+
+Depending on your platform, the user settings file is located here:
+1. Windows %APPDATA%\Code\User\settings.json
+2. macOS $HOME/Library/Application Support/Code/User/settings.json
+3. Linux $HOME/.config/Code/User/settings.json
+
Configurations are specified in corresponding config files. And these tools
would look up for configuration files in the root of the project automatically,
e.g. `.pylintrc`.
Review comment:
do the settings in line 22-34 lead to the same format result as the
configuration file?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services