-
Notifications
You must be signed in to change notification settings - Fork 227
Fix AST Viewer #949
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
Fix AST Viewer #949
Changes from 1 commit
37ab1b7
c4a8b9b
024d3e6
5b4479f
2c707bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,8 @@ import { CodeQLCliServer, QueryInfoByLanguage } from '../../cli'; | |
| import { CodeQLExtensionInterface } from '../../extension'; | ||
| import { skipIfNoCodeQL } from '../ensureCli'; | ||
| import { getOnDiskWorkspaceFolders } from '../../helpers'; | ||
| import { resolveQueries } from '../../contextual/queryResolver'; | ||
| import { KeyType } from '../../contextual/keyType'; | ||
|
|
||
| /** | ||
| * Perform proper integration tests by running the CLI | ||
|
|
@@ -68,4 +70,16 @@ describe('Use cli', function() { | |
| const queryInfo: QueryInfoByLanguage = await cli.resolveQueryByLanguage(getOnDiskWorkspaceFolders(), Uri.file(queryPath)); | ||
| expect((Object.keys(queryInfo.byLanguage))[0]).to.eql('javascript'); | ||
| }); | ||
|
|
||
| it.only('should resolve printAST queries', async function() { | ||
| skipIfNoCodeQL(this); | ||
|
|
||
| const result = await resolveQueries(cli, { | ||
| dbschemePack: 'codeql/javascript-all', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do these tests get the query repo checkout? If we're splitting over multiple CLI versions, we should use the corresponding
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As discussed, the integration tests checks out the expected codeql version for each CLI version. |
||
| dbschemePackIsLibraryPack: true, | ||
| queryPack: 'codeql/javascript-queries' | ||
| }, KeyType.PrintAstQuery); | ||
| expect(result.length).to.eq(1); | ||
| expect(result[0].endsWith('javascript/ql/src/printAst.ql')).to.be.true; | ||
| }); | ||
| }); | ||
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.
Should we make this loop over all languages? The filenames may differ.
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.
Good idea. I will change that.