From 70476e52ee0f70b588b26f0d0552831d62f35d33 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Thu, 18 May 2023 15:56:07 +0200 Subject: [PATCH] Bug report template: various tweaks * Improve readability of reports by using headers. * Improve readability of the versions list by using a table. * Explicitly say that screenshots of code are not acceptable as a code sample. * Added an "Install type" entry to the versions list * Added an extra checklist for bug reporters in an attempt to reduce the number of issues which should never have been opened in the first place. --- .github/ISSUE_TEMPLATE/bug_report.md | 34 ++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2f740a4755..edb4b4c75c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -18,15 +18,15 @@ Please report bugs for externally maintained sniffs to the appropriate external standard repository (not here). --> -**Describe the bug** +## Describe the bug A clear and concise description of what the bug is. -**Code sample** +### Code sample ```php -echo "A short code snippet that can be used to reproduce the bug"; +echo "A short code snippet that can be used to reproduce the bug. Do NOT paste screenshots of code!"; ``` -**Custom ruleset** +### Custom ruleset ```xml @@ -34,7 +34,7 @@ echo "A short code snippet that can be used to reproduce the bug"; ``` -**To reproduce** +### To reproduce Steps to reproduce the behavior: 1. Create a file called `test.php` with the code sample above... 2. Run `phpcs test.php ...` @@ -43,14 +43,24 @@ Steps to reproduce the behavior: PHPCS output here ``` -**Expected behavior** +## Expected behavior A clear and concise description of what you expected to happen. -**Versions (please complete the following information):** - - OS: [e.g., Windows 10, MacOS 10.15] - - PHP: [e.g., 7.2, 7.4] - - PHPCS: [e.g., 3.5.5, master] - - Standard: [e.g., PSR2, PSR12, Squiz] +## Versions (please complete the following information) -**Additional context** +| | | +|-------------------------|------------------------------------------------------------------------------| +| Operating System | [e.g., Windows 10, MacOS 10.15] | +| PHP version | [e.g., 7.2, 7.4] | +| PHP_CodeSniffer version | [e.g., 3.5.5, master] | +| Standard | [e.g., PSR2, PSR12, Squiz, custom] | +| Install type | [e.g. Composer (global/local), PHAR, PEAR, git clone, other (please expand)] | + +## Additional context Add any other context about the problem here. + +## Please confirm: + +- [ ] I have searched the issue list and am not opening a duplicate issue. +- [ ] I confirm that this bug is a bug in PHP_CodeSniffer and not in one of the external standards. +- [ ] I have verified the issue still exists in the `master` branch of PHP_CodeSniffer.