github/codeql

Query help files should be identified and processed when executing codeql pack create

carlspring opened this issue · 3 comments

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:

  1. If you're creating a query pack, if there are qhelp files in the same directory where the ql files are, the more intuitive and (requiring less effort) thing to do is to actually identify that there are qhelp files and automatically process them. The output format for this could be controlled via a property in the qlpack.yml.
  2. On Github the default format for commenting, editing and documentation is Markdown. So... the default output format for both codeql generate query-help and the proposed request for changes should be Markdown and it should be possible to execute the command without having to specify this.
  3. If an .md file exists for a .ql and there is no .qhelp file, 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 .md file in the end.

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?

Closing this issue since we recommend that you create .md files with the appropriate help text instead of using qhelp.

Thanks for following up on this, @aeisenberg ! :)