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
@@ -13,19 +13,19 @@ Please note that this project is released with a [Contributor Code of Conduct][c
13
13
14
14
## Submitting a pull request
15
15
16
-
0.[Fork][fork] and clone the repository
17
-
0. Set up a local build
18
-
0. Create a new branch: `git checkout -b my-branch-name`
19
-
0. Make your change
20
-
0. Push to your fork and [submit a pull request][pr]
21
-
0. Pat yourself on the back and wait for your pull request to be reviewed and merged.
16
+
1.[Fork][fork] and clone the repository
17
+
1. Set up a local build
18
+
1. Create a new branch: `git checkout -b my-branch-name`
19
+
1. Make your change
20
+
1. Push to your fork and [submit a pull request][pr]
21
+
1. Pat yourself on the back and wait for your pull request to be reviewed and merged.
22
22
23
23
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
24
24
25
-
- Follow the [style guide][style].
26
-
- Write tests. Tests that don't require the VS Code API are located [here](extensions/ql-vscode/test). Integration tests that do require the VS Code API are located [here](extensions/ql-vscode/src/vscode-tests).
27
-
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
28
-
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
25
+
* Follow the [style guide][style].
26
+
* Write tests. Tests that don't require the VS Code API are located [here](extensions/ql-vscode/test). Integration tests that do require the VS Code API are located [here](extensions/ql-vscode/src/vscode-tests).
27
+
* Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
28
+
* Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
29
29
30
30
## Setting up a local build
31
31
@@ -42,12 +42,22 @@ If you plan on building from the command line, it's easiest if Rush is installed
42
42
npm install -g @microsoft/rush
43
43
```
44
44
45
+
To get started, run:
46
+
47
+
```shell
48
+
rush update && rush build
49
+
```
50
+
45
51
Note that when you run the `rush` command from the globally installed version, it will examine the
46
52
`rushVersion` property in the repo's `rush.json`, and if it differs from the globally installed
47
53
version, it will download, cache, and run the version of Rush specified in the `rushVersion`
48
54
property.
49
55
50
-
If you plan on only building via VS Code tasks, you don't need Rush installed at all, since those
56
+
A few more things to know about using rush:
57
+
58
+
* Avoid running `npm` for any commands that install/link dependencies
59
+
* Instead use the *rush* equivalent: `rush add <package>`, `rush update`, etc.
60
+
* If you plan on only building via VS Code tasks, you don't need Rush installed at all, since those
51
61
tasks run `common/scripts/install-run-rush.js` to bootstrap a locally installed and cached copy of
52
62
Rush.
53
63
@@ -66,7 +76,7 @@ a single-project repo. With Rush, you need to do an "update" instead:
66
76
##### From the command line
67
77
68
78
```shell
69
-
$ rush update
79
+
rush update
70
80
```
71
81
72
82
#### Building all projects (instead of `gulp`)
@@ -100,6 +110,8 @@ force a full rebuild of all projects:
100
110
rush rebuild --verbose
101
111
```
102
112
113
+
Note that `rush rebuild` performs a complete rebuild, whereas `rush build` performs an incremental build and in many cases will not need to do anything at all.
114
+
103
115
### Installing
104
116
105
117
You can install the `.vsix` file from within VS Code itself, from the Extensions container in the sidebar:
@@ -118,6 +130,18 @@ $ vscode/scripts/code-cli.sh --install-extension dist/vscode-codeql-*.vsix # if
118
130
119
131
You can use VS Code to debug the extension without explicitly installing it. Just open this directory as a workspace in VS Code, and hit `F5` to start a debugging session.
120
132
133
+
### Running the unit/integration tests
134
+
135
+
Ensure the `CODEQL_PATH` environment variable is set to point to the `codeql` cli executable.
136
+
137
+
Outside of vscode, run:
138
+
139
+
```shell
140
+
npm run test&& npm run integration
141
+
```
142
+
143
+
Alternatively, you can run the tests inside of vscode. There are several vscode launch configurations defined that run the unit and integration tests. They can all be found in the debug view.
144
+
121
145
## Releasing (write access required)
122
146
123
147
1. Trigger a release build on Actions by adding a new tag on master of the format `vxx.xx.xx`
@@ -126,10 +150,10 @@ You can use VS Code to debug the extension without explicitly installing it. Jus
126
150
1. Log into the [Visual Studio Marketplace](https://marketplace.visualstudio.com/manage/publishers/github).
127
151
1. Click the `...` menu in the CodeQL row and click **Update**.
128
152
1. Drag the `.vsix` file you downloaded from the GitHub release into the Marketplace and click **Upload**.
129
-
1. Publish the draft GitHub release and confirm the new release is marked as the latest release at https://github.com/github/vscode-codeql/releases.
153
+
1. Publish the draft GitHub release and confirm the new release is marked as the latest release at <https://github.com/github/vscode-codeql/releases>.
130
154
131
155
## Resources
132
156
133
-
-[How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
0 commit comments