Be able to specify the name of the skeleton query file
We introduced this QlPackGenerator a while ago. It always creates an `example.ql` query file as part of the skeleton pack.
We'd like to set the name of the query file, since we'll allow the user to create queries multiple times in the same skeleton pack folder.
The folder will be named `codeql-custom-queries-${language}` and will first receive an `example.ql` file.
If the user then tries to create a new query for the same language, we'll just create an `example2.ql`, `example3.ql` etc. file in the existing folder.
This commit is contained in:
@@ -66,8 +66,8 @@ export class QlPackGenerator {
|
||||
await writeFile(qlPackFilePath, this.header + dump(qlPackYml), "utf8");
|
||||
}
|
||||
|
||||
private async createExampleQlFile() {
|
||||
const exampleQlFilePath = join(this.folderUri.fsPath, "example.ql");
|
||||
public async createExampleQlFile(fileName = "example.ql") {
|
||||
const exampleQlFilePath = join(this.folderUri.fsPath, fileName);
|
||||
|
||||
const exampleQl = `
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user