forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Document contribution to the code along with coding standards #321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
DonJayamanne
merged 38 commits into
microsoft:master
from
DonJayamanne:UpdateContribution
Dec 1, 2017
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
ecc1ca9
Fix Microsoft/vscode#37627 (#1368)
octref 7c5778c
Version 0.7.0 of extension (#1381)
DonJayamanne 9d1bf82
Update README.md
DonJayamanne ffba179
Update README.md
DonJayamanne 905c713
sync fork with upstream
DonJayamanne acc2109
fix readme
DonJayamanne d470523
Merge branch 'master' of https://github.com/Microsoft/vscode-python
DonJayamanne d392e8b
merged upstream
DonJayamanne 92f775f
Merge remote-tracking branch 'upstream/master'
DonJayamanne 32a6e53
Merge remote-tracking branch 'upstream/master'
DonJayamanne 4b30f2c
Merge remote-tracking branch 'upstream/master'
DonJayamanne e396752
Merge remote-tracking branch 'upstream/master'
DonJayamanne eff4792
Merge remote-tracking branch 'upstream/master'
DonJayamanne 4553c28
Merge remote-tracking branch 'upstream/master'
DonJayamanne 3c6520a
Merge remote-tracking branch 'upstream/master'
DonJayamanne 966e516
Merge remote-tracking branch 'upstream/master'
DonJayamanne 63d2d65
Merge remote-tracking branch 'upstream/master'
DonJayamanne f6d469e
Merge remote-tracking branch 'upstream/master'
DonJayamanne 6ffff66
updated
DonJayamanne bbe87a5
updated with coding standards
DonJayamanne 23fd9fe
fixed headings
DonJayamanne f6f066d
updated tasks.json
DonJayamanne 1edddb9
udpated gulp
DonJayamanne 28c3028
always handle errors
DonJayamanne b5abe4a
oops
DonJayamanne 9f83347
use node 8.9.1 and npm 5.5.1
DonJayamanne 7b5c8a4
use any for options
DonJayamanne a382f88
fix pre launch task name
DonJayamanne 029e055
Merge remote-tracking branch 'upstream/master'
DonJayamanne e8c71c0
Merge remote-tracking branch 'upstream/master'
DonJayamanne 51cf9d2
Merge remote-tracking branch 'upstream/master'
DonJayamanne 60382a5
merged master
DonJayamanne 4d46790
updated
DonJayamanne 2158029
remove copyright check
DonJayamanne 7aadc43
Merge remote-tracking branch 'upstream/master'
DonJayamanne e33ef0b
merged
DonJayamanne 1233177
updated gulp
DonJayamanne bfdcb01
fixed code review comments
DonJayamanne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ addons: | |
- g++-4.9-multilib | ||
- libgtk2.0-0 | ||
- libx11-dev | ||
- libxkbfile-dev | ||
- libxkbfile-dev | ||
- libsecret-1-dev | ||
- python-dev | ||
matrix: | ||
|
@@ -41,8 +41,9 @@ before_install: | | |
git submodule update --init --recursive | ||
git clone https://github.com/creationix/nvm.git ./.nvm | ||
source ./.nvm/nvm.sh | ||
nvm install 7.2.1 | ||
nvm use 7.2.1 | ||
nvm install 8.9.1 | ||
nvm use 8.9.1 | ||
npm i -g [email protected] | ||
npm config set python `which python` | ||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then | ||
pyenv install $PYTHON | ||
|
@@ -53,6 +54,6 @@ install: | |
- pip install --upgrade -r requirements.txt | ||
- npm install | ||
- npm run vscode:prepublish | ||
|
||
script: | ||
- npm test --silent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
## Coding guidelines for TypeScript | ||
* The following standards are inspired from [Coding guidelines for TypeScript](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines). | ||
|
||
### Names | ||
* Use PascalCase for type names. | ||
* Use "I" as a prefix for interface names only when an interface is implemented by a class. | ||
* Use PascalCase for enum values. | ||
* Use camelCase for function names. | ||
* Use camelCase for property names and local variables. | ||
* Do not use "_" as a prefix for private properties (unless used as backing properties). | ||
* Use whole words in names when possible. | ||
|
||
### Types | ||
|
||
* Do not export types/functions unless you need to share it across multiple components. | ||
* Do not introduce new types/values to the global namespace. | ||
* Shared types should be defined in 'types.ts'. | ||
Within a file, type definitions should come first. | ||
|
||
### null and undefined | ||
|
||
Use undefined. Do not use null. | ||
|
||
### Comments | ||
|
||
Use JSDoc style comments for functions, interfaces, enums, and classes. | ||
|
||
### Strings | ||
|
||
Use single quotes for strings. | ||
|
||
### Style | ||
|
||
* Use arrow functions over anonymous function expressions. | ||
* Always surround loop and conditional bodies with curly braces. Statements on the same line are allowed to omit braces. | ||
* Open curly braces always go on the same line as whatever necessitates them. | ||
* Parenthesized constructs should have no surrounding whitespace. | ||
* A single space follows commas, colons, and semicolons in those constructs. For example: | ||
* `for (var i = 0, n = str.length; i < 10; i++) { }` | ||
* `if (x < 10) { }` | ||
* `function f(x: number, y: string): void { }` | ||
|
||
* `else` goes on a the same line from the closing curly brace. | ||
* Use 4 spaces per indentation. | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these taken from somewhere? I.e. is there a link to provide that mirrors these so that we don't have to maintain our own style guide? Or maybe one to fall back on when this style guide doesn't answer a question?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines
Will update to reference above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brettcannon updated, let me know if the updated version is good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, if the current style is divergent from the TS style guide then it LGTM.