Commit 8efc4e5
authored
Add functionality to enable use with the VS Code CodeQL extension (#20)
* Add local version pinning
This enables pinning a CodeQL version per working directory.
* Add install stub command
This installs a stub allowing the GH CodeQL extension to be used by the
VS Code extension.
* Add version override through environment variable
The environment variable `GH_CODEQL_VERSION` can be used to override the
global and local version specification. This is needed when we want to
override the CodeQL version used by the VS Code extension, because the
working directory used by the extension is `/` so we can't find any
local version specification part of the project using CodeQL.
With this override we can alias `code` to check for `.codeql-version` in
PWD or the path passed as an argument and set `GH_CODEQL_VERSION`.
* Update README with new commands
* Add description of local version pinning
* Add description of the `install-stub` command.
* Address incorrect indentation
* Add test for `install-stub` command
* Ensure the latest version is avaible for the test
* Add test for version override
* Restore the channel after the nightly version test
* Address spelling mistake in comment
* Remove superfluous download step
The selected version will be downloaded if not available.
* Address spelling mistake in comment
* Update install-stub command's descriptive comment
Explain what the command does.
* Address `jq` parser error
The version override causes a CodeQL CLI download that outputs cURL
outpuut which confuses the `jq` parser.
By running the command twice we remediate the issue.
* Add test for local pinned version modification
This test validates if we properly handle a local pinned version
modification without using the `set-local-version` command.
* Address pinning persistence influencing other tests
After each test using local pinning we unpin the version.
* Update error message when installing stub
When a directory doesn't exists, the user is asked to provide a
different directory to install a stub.
* Add permission check to install-stub command
Check if we can write to the provided/default directory and return an error message if we
can't.
* Disable per directory pinning by default
The command 'set-local-version' will show a warning when per directory
pinning is disabled (the default) and explicitly asks the user to enable
it.
* Update how we support local version
- Add explicit commands to enable/disable local version support.
- Show a warning when a local version is specified, but local version
support is disabled.
- Show a warning when enabling local version support.
- Show an error when a local version is set while local version support
is disabled.
* Address spelling mistake in test name
* Improve error message 'local-version' command1 parent 3b0cb32 commit 8efc4e5
3 files changed
Lines changed: 245 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
87 | 184 | | |
88 | 185 | | |
89 | 186 | | |
| |||
93 | 190 | | |
94 | 191 | | |
95 | 192 | | |
96 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
42 | | - | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
18 | 49 | | |
19 | 50 | | |
20 | 51 | | |
21 | 52 | | |
22 | 53 | | |
23 | 54 | | |
24 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
25 | 59 | | |
26 | 60 | | |
27 | 61 | | |
28 | 62 | | |
29 | 63 | | |
30 | 64 | | |
| 65 | + | |
31 | 66 | | |
32 | 67 | | |
33 | 68 | | |
| |||
131 | 166 | | |
132 | 167 | | |
133 | 168 | | |
134 | | - | |
| 169 | + | |
135 | 170 | | |
136 | 171 | | |
137 | 172 | | |
| |||
156 | 191 | | |
157 | 192 | | |
158 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
159 | 202 | | |
160 | 203 | | |
161 | 204 | | |
162 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
163 | 237 | | |
164 | 238 | | |
165 | 239 | | |
| |||
173 | 247 | | |
174 | 248 | | |
175 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
176 | 275 | | |
177 | 276 | | |
178 | 277 | | |
| |||
196 | 295 | | |
197 | 296 | | |
198 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
199 | 304 | | |
200 | 305 | | |
201 | 306 | | |
| |||
0 commit comments