summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2023-03-29 10:05:34 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2023-03-29 11:38:51 +0200
commit5e94497239058514d4e186edb4eed9b670af9ddc (patch)
treeab68c86c7c52ceec18983f3f747d1260717b1375
parent366e346dc25d2429eb75ae80543c0f66abb633cf (diff)
downloadpylint-git-5e94497239058514d4e186edb4eed9b670af9ddc.tar.gz
[crash template] Add <details> tag and current headers for clearer result
refs #8509
-rw-r--r--pylint/lint/utils.py29
1 files changed, 23 insertions, 6 deletions
diff --git a/pylint/lint/utils.py b/pylint/lint/utils.py
index f0c841f62..8df7a2ef8 100644
--- a/pylint/lint/utils.py
+++ b/pylint/lint/utils.py
@@ -30,12 +30,13 @@ Then create a new crash issue:
https://github.com/PyCQA/pylint/issues/new?assignees=&labels=crash%2Cneeds+triage&template=BUG-REPORT.yml
"""
- template += f"""\
-
+ template += f"""
Issue title:
Crash ``{ex}`` (if possible, be more specific about what made pylint crash)
-Content:
-When parsing the following file:
+
+### Bug description
+
+When parsing the following ``a.py``:
<!--
If sharing the code is not an option, please state so,
@@ -46,11 +47,27 @@ When parsing the following file:
{file_content}
```
-pylint crashed with a ``{ex.__class__.__name__}`` and with the following stacktrace:
+### Command used
+
+```shell
+pylint a.py
```
+
+### Pylint output
+
+<details open>
+ <summary>
+ pylint crashed with a ``{ex.__class__.__name__}`` and with the following stacktrace:
+ </summary>
+
+```python
"""
template += traceback.format_exc()
- template += "```\n"
+ template += """
+```
+
+</details>
+"""
try:
with open(issue_template_path, "a", encoding="utf8") as f:
f.write(template)