Skip to content

Commit bc7264c

Browse files
author
james
committed
update query help script
1 parent 4a9b612 commit bc7264c

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

docs/language/query-help-markdown.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
# Define which languages and query packs to consider
2222
languages = [ "cpp", "csharp", "go", "java", "javascript", "python"]
2323

24-
# generate query-help fails for some queries in these suites. Faliures generate an error message.
25-
packs = ["code-scanning", "security-and-quality", "security-extended"]
26-
24+
# Query suites to generate help for
25+
# lgtm-full suites covers all queries used in code scanning and on lgtm.com plus a few more
26+
packs = ["lgtm-full"]
2727

2828
def prefix_repo_nwo(filename):
2929
"""
@@ -197,8 +197,10 @@ def subprocess_run(cmd):
197197
# Insert metadata block into query help directly under title
198198
full_help = query_help.replace("\n", meta_string, 1)
199199

200-
# Basename of query, used to make markdown output filepath
201-
query_name = os.path.split(queryfile_nwo)[1][:-3]
200+
# Use id property (without language code) to make name for markdown file
201+
s = query_id.index("/")
202+
# replace "/" with "-"
203+
query_name = query_id[s+1:-1].replace("/", "-")
202204

203205
# Populate index_file_dictionary with @name extracted from metadata and corresponding query filename
204206
index_file_dictionary[query_name_meta] = lang + "/" + query_name

0 commit comments

Comments
 (0)