Граф коммитов

1495 Коммитов

Автор SHA1 Сообщение Дата
alexet b04d84c194 Rename queryCounter to nextQueryId. 2019-11-25 14:22:10 +00:00
alexet 5a5681db12 Store the current counter value and use it for the sorted results path.
This way they don't clash when switching between sorted queries.
2019-11-25 12:14:18 +00:00
Alexander Eyers-Taylor 6e9c64d9fc
Merge pull request #177 from henrymercer/improve-errors
Improve error handling for CLI installation and updates
2019-11-25 12:09:12 +00:00
Dave Bartolomeo 9e6100f383 Merge remote-tracking branch 'upstream/master' into dbartol/QLTest 2019-11-22 10:35:04 -07:00
Aditya Sharad 6f4211b579
Merge pull request #180 from github/dbartol/Bump-1.02
Bump version to 1.0.2
2019-11-22 09:33:25 -08:00
Dave Bartolomeo 4c8c4ef153
Bump version to 1.0.2
Now that we've released 1.0.1, all subsequent builds should be prerelease versions of 1.0.2
2019-11-22 10:28:29 -07:00
Henry Mercer 72023abaaf
Merge pull request #179 from shati-patel/move-changelog
Move changelog to be packaged with extension
2019-11-22 11:45:30 +00:00
Shati Patel b65a0ceb74 Move changelog to be packaged with extension 2019-11-22 11:26:48 +00:00
Dave Bartolomeo 7d325e3832 Fix file-watching bug in QLTest discovery 2019-11-21 14:13:55 -07:00
jcreedcmu 07f96bf43e
Merge pull request #178 from adityasharad/add-changelog
Add changelog.
2019-11-21 13:21:33 -05:00
Aditya Sharad 5d8e12865d Add changelog. 2019-11-21 10:11:04 -08:00
Henry Mercer b48fbdebff Report rate limiting errors more clearly
Also report problems updating the distribution on extension activation
as warnings, and improve task names in error messages.
2019-11-21 16:46:57 +00:00
Alexander Eyers-Taylor 36fedac2ca
Merge pull request #174 from henrymercer/settings-scope
Change distribution settings to machine scope
2019-11-21 15:10:03 +00:00
Asger F 7a2edfbbf9 Add commands for path navigation 2019-11-21 15:09:49 +00:00
Asger F c0ffb7eaf1 Lift parseSarifLocation out of class 2019-11-21 15:04:17 +00:00
Asger F 3e8c53be78 Highlight currently selected path node 2019-11-21 14:49:15 +00:00
Henry Mercer 8400f75bb5 Change distribution settings to machine scope 2019-11-21 12:43:54 +00:00
Dave Bartolomeo cbe3c055b6 `odasa` -> `Semmle Core` 2019-11-20 17:19:29 -07:00
Dave Bartolomeo e37807c45e Better error message when `odasa` is not configured properly 2019-11-20 17:12:29 -07:00
Dave Bartolomeo be72e9b67a Activate when Test Explorer view is opened 2019-11-20 17:11:43 -07:00
Dave Bartolomeo 85f7ff1d11 Attempt to fix pure test failure 2019-11-20 16:28:03 -07:00
Dave Bartolomeo ddf42d81d1 Fix LGTM alerts 2019-11-20 14:55:08 -07:00
Dave Bartolomeo 444aca3bae Implement QL Test support (using `odasa` for now)
The PR contains the initial implementing of QL Test support in CodeQL for Visual Studio Code. Because QL Test support isn't quite ready in the CLI yet, this PR uses `odasa` to run the tests for now. As CLI support comes online, it should be straightforward to swap out the implementation to use the CLI.

The treeview UI for the tests is implemented via the `hbenl.vscode-test-explorer` extension. This extension is open source, and appears to be actively maintained. It's used by a couple dozen existing extensions for tests for various languages. The extension doesn't really do anything on its own, so taking it as a dependency isn't introducing any unwanted UI clutter. Note that I did have to remove the `--disable-extensions` argument from `launch.json`, because otherwise the test explorer extension gets disabled, preventing our own extension from loading.

The UI will display a root node for each QL pack that contains tests, with the actual test directories and files as descendants of that root node. We consider only those QL packs in the workspace; QL packs on the default CodeQL search path are ignored. We use `codeql resolve qlpacks` to find the packs, and then watch all `qlpack.yml` files in the workspace for changes in order to refresh the pack discovery when necessary. Ideally, we'd have the CLI return a set of path patterns to watch, but for now the current implementation works fine.

To discover the tests within a given pack, we walk the pack's directory tree manually for now, until the relevant CLI command is available. Because we do not yet have a mechanism in `qlpack.yml` to specify whether or not the pack contains tests, we assume that any pack whose name ends with "-tests" to contain nothing but tests, and any other pack to contain no tests. This is sufficient for the tests in the QL repo. As with QL pack discovery, we watch the file system for changes in `.ql` and `.qlref` files in order to refresh the tree of tests if anything changes.

To actually run the tests, we just invoke `odasa qltest` with the appropriate arguments. This code is pretty much a straight copy-and-paste from the repo where I've had a private version of QL Test support for several months. Once we can run tests via the CLI, this will all be deleted.

The `test-ui.ts` file implements a couple of additional commands for the context menu of the test treeview. You can accept the output of a failing test (copying the `.actual` file to the `.expected` file), and you can bring up a diff view of the `.expected` and `.actual` files).

This PR includes a couple of related utility classes. `UIService` makes it a little easier to implement a service that handles VS Code commands. `Discovery` is a base class that handles most of the work that is shared between the different kinds of discovery that we do, like avoiding running multiple discovery operations simultaneously if we get a storm of file change notifications.
2019-11-20 14:42:33 -07:00
jcreedcmu a5594043e1
Merge pull request #164 from asgerf/asgerf/decorate-selected-path-node
Add decoration to focused item
2019-11-20 09:04:23 -05:00
Asger F 1fc5e77de6 Fix typo in comment 2019-11-20 11:13:45 +00:00
Asger F 0c45210021 Treat single-line and multi-line ranges differently 2019-11-20 10:22:56 +00:00
Aditya Sharad 4287f4d01b
Merge pull request #169 from jcreedcmu/no-selected-class
Simplify selected results table handling
2019-11-19 08:47:42 -08:00
Aditya Sharad cfcbdcd3d0
Merge pull request #170 from jcreedcmu/fix-upgrades
Fix auto-upgrade script path
2019-11-18 13:08:27 -08:00
Jason Reed a1f0af9086 Fix auto-upgrade script path
This was a simple case of passing entirely the wrong data as an
argument to the `upgradeDatabase` call in `queries.ts`. We were
passing the list of search paths for upgrades, when we should have
been passing the list of directories directly containing upgrade
scripts to be applied.
2019-11-18 15:56:45 -05:00
Jason Reed 155a235cf1 Simplify selected results table handling
We don't need to render all tables and use css to hide the ones we
don't currently want to see. Instead have `render` return the dom that
should be visible given the current state.
2019-11-18 09:20:32 -05:00
Aditya Sharad 1dffeb97d3
Merge pull request #167 from dbartol/dbartol/version
A few versioning fixes
2019-11-15 15:05:41 -08:00
Dave Bartolomeo 27c171c5c9 Add missing escape 2019-11-15 15:07:58 -07:00
Aditya Sharad d29f7492a8
Merge pull request #166 from shati-patel/docs/anchor
Readme: Fix anchor link
2019-11-15 13:13:50 -08:00
Dave Bartolomeo 822b565d6f A few versioning fixes
- Bumps the version of the extension to 1.0.1. We should bump the version immediately after every official release, so that any builds that happen after the release are treated as prerelease versions of the next release.

- Separates the components of the timestamp in the version number for non-release builds. This just makes it easier to read. I also left off the milliseconds, which were kind of overkill, and switched to using UTC time to avoid time-zone ambiguity.

- Updates the version number in the copy of the extension's `package.json` that winds up in the actual .vsix, so VS Code actually sees the version as being the proper prelease version.
2019-11-15 13:24:37 -07:00
shati-patel 5f90ea5304
Readme: Fix anchor link 2019-11-15 18:15:03 +00:00
Dave Bartolomeo f1e44ef7f3
Merge pull request #165 from jcreedcmu/remove-items
Allow removing items from query history
2019-11-15 11:08:36 -07:00
Jason Reed 0e53afc19b Allow removing items from query history 2019-11-15 09:27:29 -05:00
Alexander Eyers-Taylor a5da556496
Merge pull request #163 from henrymercer/remove-dead-code
Remove dead code from archive filesystem provider
2019-11-15 13:38:19 +00:00
Henry Mercer 76531a0cfc Remove dead code from archive filesystem provider 2019-11-15 11:54:42 +00:00
Asger F 4f8b12b13a Add decoration to focused item 2019-11-15 11:53:31 +00:00
Alexander Eyers-Taylor 9e9b49c1e3
Merge pull request #162 from henrymercer/remove-cast-after-fixed-typedef
Remove cast now unzipper typedef fix is merged
2019-11-15 10:58:58 +00:00
Henry Mercer 59e0ceec9a Remove cast now unzipper typedef fix is merged
Related PR fixing typedef: DefinitelyTyped/DefinitelyTyped#40240
2019-11-15 10:14:39 +00:00
Aditya Sharad 69b0dd7eb3
Merge pull request #161 from dbartol/dbartol/TypeScript37
Update to TypeScript 3.7.2
2019-11-14 14:41:12 -08:00
Dave Bartolomeo b6e7fb1219 Update to TypeScript 3.7.2 2019-11-14 14:45:40 -07:00
Aditya Sharad d9a1dce7fa CodeQL for VS Code: Initial commit. 2019-11-13 12:23:53 -08:00