|
2 | 2 | name: Bug report |
3 | 3 | about: Create a report to help us improve |
4 | 4 | title: '' |
5 | | -labels: '' |
| 5 | +labels: ['Status: triage', 'Type: bug'] |
6 | 6 | assignees: '' |
7 | 7 |
|
8 | 8 | --- |
9 | 9 |
|
10 | | -**Describe the bug** |
| 10 | +<!-- |
| 11 | +Before reporting a sniff related bug, please check the error code using `phpcs -s`. |
| 12 | +
|
| 13 | +If the error code starts with anything other than `Generic`, `MySource`, `PEAR`, |
| 14 | +`PSR1`, `PSR2`, `PSR12`, `Squiz` or `Zend`, the error is likely coming from an |
| 15 | +external PHP_CodeSniffer standard. |
| 16 | +
|
| 17 | +Please report bugs for externally maintained sniffs to the appropriate external |
| 18 | +standard repository (not here). |
| 19 | +--> |
| 20 | + |
| 21 | +## Describe the bug |
| 22 | + |
11 | 23 | A clear and concise description of what the bug is. |
12 | 24 |
|
13 | | -**Code sample** |
| 25 | +### Code sample |
14 | 26 | ```php |
15 | | -echo "A short code snippet that can be used to reproduce the bug"; |
| 27 | +echo 'A short code snippet that can be used to reproduce the bug.'; |
| 28 | +echo 'Do NOT paste screenshots of code!"; |
16 | 29 | ``` |
17 | 30 |
|
18 | | -**Custom ruleset** |
| 31 | +### Custom ruleset |
19 | 32 | ```xml |
20 | 33 | <?xml version="1.0"?> |
21 | 34 | <ruleset name="My Custom Standard"> |
22 | | - <description>If you are using a custom ruleset, please enter it here.</description> |
| 35 | + <description>If you are using a custom ruleset, please enter the relevant part here.</description> |
23 | 36 | </ruleset> |
24 | 37 | ``` |
25 | 38 |
|
26 | | -**To reproduce** |
| 39 | +### To reproduce |
27 | 40 | Steps to reproduce the behavior: |
28 | 41 | 1. Create a file called `test.php` with the code sample above... |
29 | 42 | 2. Run `phpcs test.php ...` |
30 | 43 | 3. See error message displayed |
31 | | -``` |
| 44 | +```text |
32 | 45 | PHPCS output here |
33 | 46 | ``` |
34 | 47 |
|
35 | | -**Expected behavior** |
| 48 | +## Expected behavior |
| 49 | + |
36 | 50 | A clear and concise description of what you expected to happen. |
37 | 51 |
|
38 | | -**Versions (please complete the following information):** |
39 | | - - OS: [e.g., Windows 10, MacOS 10.15] |
40 | | - - PHP: [e.g., 7.2, 7.4] |
41 | | - - PHPCS: [e.g., 3.5.5, master] |
42 | | - - Standard: [e.g., PSR2, PSR12, Squiz] |
| 52 | +## Versions (please complete the following information) |
| 53 | + |
| 54 | +| | | |
| 55 | +|--------------------------|---------------------------------------------------------------------- | |
| 56 | +| Operating System | [e.g., Windows 10, MacOS 10.15] | |
| 57 | +| PHP version | [e.g., 7.2, 8.1] | |
| 58 | +| PHP_CodeSniffer version | [e.g., 3.7.2, master] | |
| 59 | +| Standard | [e.g., PSR2, PSR12, Squiz, custom] | |
| 60 | +| Install type | [e.g. Composer (global/local), PHAR, git clone, other (please expand)] | |
| 61 | + |
| 62 | +## Additional context |
43 | 63 |
|
44 | | -**Additional context** |
45 | 64 | Add any other context about the problem here. |
| 65 | + |
| 66 | +## Please confirm |
| 67 | + |
| 68 | +- [ ] I have searched the issue list and am not opening a duplicate issue. |
| 69 | +- [ ] I have read the [Contribution Guidelines](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/.github/CONTRIBUTING.md) and this is not a [support question](https://github.com/PHPCSStandards/PHP_CodeSniffer/discussions). |
| 70 | +- [ ] I confirm that this bug is a bug in PHP_CodeSniffer and not in one of the external standards. |
| 71 | +- [ ] I have verified the issue still exists in the `master` branch of PHP_CodeSniffer. |
0 commit comments