Query help files should be identified and processed when executing codeql pack create
carlspring opened this issue · 3 comments
carlspring commented
Task Description
At the moment, before building the query pack, one needs to do:
codeql generate query-help *.qhelp --format=markdown -o .
Then:
codeql pack create
A couple of things don't really make sense:
- If you're creating a query pack, if there are
qhelpfiles in the same directory where theqlfiles are, the more intuitive and (requiring less effort) thing to do is to actually identify that there areqhelpfiles and automatically process them. The output format for this could be controlled via a property in theqlpack.yml. - On Github the default format for commenting, editing and documentation is Markdown. So... the default output format for both
codeql generate query-helpand the proposed request for changes should be Markdown and it should be possible to execute the command without having to specify this. - If an
.mdfile exists for a.qland there is no.qhelpfile, use that instead. I am sure that many other researchers and developers would prefer this option over having to craft a.qhelp(which is a custom XML) file which will ultimately just get converted to an.mdfile in the end.
aeisenberg commented
CodeQL already recognizes markdown files that are placed next to query files. *.md files are also always copied into the pack when it is being created.
Does this do what you want it to?
aeisenberg commented
Closing this issue since we recommend that you create .md files with the appropriate help text instead of using qhelp.
carlspring commented
Thanks for following up on this, @aeisenberg ! :)