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
* The following standards are inspired from [Coding guidelines for TypeScript](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines).
3
+
4
+
### Names
5
+
* Use PascalCase for type names.
6
+
* Use "I" as a prefix for interface names only when an interface is implemented by a class.
7
+
* Use PascalCase for enum values.
8
+
* Use camelCase for function names.
9
+
* Use camelCase for property names and local variables.
10
+
* Do not use "_" as a prefix for private properties (unless used as backing properties).
11
+
* Use whole words in names when possible.
12
+
13
+
### Types
14
+
15
+
* Do not export types/functions unless you need to share it across multiple components.
16
+
* Do not introduce new types/values to the global namespace.
17
+
* Shared types should be defined in 'types.ts'.
18
+
Within a file, type definitions should come first.
19
+
20
+
### null and undefined
21
+
22
+
Use undefined. Do not use null.
23
+
24
+
### Comments
25
+
26
+
Use JSDoc style comments for functions, interfaces, enums, and classes.
27
+
28
+
### Strings
29
+
30
+
Use single quotes for strings.
31
+
32
+
### Style
33
+
34
+
* Use arrow functions over anonymous function expressions.
35
+
* Always surround loop and conditional bodies with curly braces. Statements on the same line are allowed to omit braces.
36
+
* Open curly braces always go on the same line as whatever necessitates them.
37
+
* Parenthesized constructs should have no surrounding whitespace.
38
+
* A single space follows commas, colons, and semicolons in those constructs. For example:
39
+
*`for (var i = 0, n = str.length; i < 10; i++) { }`
40
+
*`if (x < 10) { }`
41
+
*`function f(x: number, y: string): void { }`
42
+
43
+
*`else` goes on a the same line from the closing curly brace.
Run the build Task from the [Command Palette](https://code.visualstudio.com/docs/editor/tasks) (short cut CTRL+SHIFT+B or ⇧⌘B)
23
+
24
+
Run the `Compile` and `Hygiene` build Tasks from the [Command Palette](https://code.visualstudio.com/docs/editor/tasks) (short cut `CTRL+SHIFT+B` or `⇧⌘B`)
19
25
20
26
### Errors and Warnings
21
-
TypeScript errors and warnings will be displayed in VS Code in the Problems Panel (CTRL+SHIFT+M or ⇧⌘M)
27
+
28
+
TypeScript errors and warnings will be displayed in VS Code in the following areas:
29
+
* Problems Panel (`CTRL+SHIFT+M` or `⇧⌘M`)
30
+
* Terminal running the `Compile` task
31
+
* Terminal running the `Hygiene` task
22
32
23
33
### Validate your changes
34
+
24
35
To test the changes you launch a development version of VS Code on the workspace vscode, which you are currently editing.
25
-
Use the "Launch Extension" launch option.
36
+
Use the `Launch Extension` launch option.
26
37
27
38
### Unit Tests
28
-
Run the Unit Tests via the "Launch Test" launch option.
29
-
Currently unit tests only run on [Travis](https://travis-ci.org/DonJayamanne/pythonVSCode)
39
+
40
+
Run the Unit Tests via the `Launch Test` and `Launch Multiroot Tests` launch option.
41
+
Currently unit tests only run on [Travis](https://travis-ci.org/Microsoft/vscode-python)
30
42
31
43
_Requirements_
32
44
1. Ensure you have disabled breaking into 'Uncaught Exceptions' when running the Unit Tests
33
45
2. For the linters and formatters tests to pass successfully, you will need to have those corresponding Python libraries installed locally
34
46
35
-
## Debugging the extension
36
47
### Standard Debugging
48
+
37
49
Clone the repo into any directory and start debugging.
38
-
From there use the "Launch Extension" launch option.
50
+
From there use the `Launch Extension` launch option.
39
51
40
52
### Debugging the Python Extension Debugger
53
+
41
54
The easiest way to debug the Python Debugger (in our opinion) is to clone this git repo directory into [your](https://code.visualstudio.com/docs/extensions/install-extension#_your-extensions-folder) extensions directory.
42
-
From there use the ```Launch Extension as debugserver``` launch option.
55
+
From there use the ```Extension + Debugger``` launch option.
56
+
57
+
### Coding Standards
58
+
59
+
Information on our coding standards can be found [here](https://github.com/Microsoft/vscode-python/blob/master/CODING_STANDARDS.md).
60
+
We have a pre-commit hook to ensure the code committed will adhere to the above coding standards.
0 commit comments