|
| 1 | +--- |
| 2 | +name: "\U0001F41B Bug report for sniffs" |
| 3 | +about: I got unexpected behavior and think it is a bug. |
| 4 | +title: '' |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +<!-- |
| 9 | +PLEASE FILL OUT THE TEMPLATE COMPLETELY. |
| 10 | +BUG REPORTS WHICH CANNOT BE REPRODUCED BASED ON THE INFORMATION PROVIDED WILL BE CLOSED. |
| 11 | +--> |
| 12 | + |
| 13 | +## Bug Description |
| 14 | +<!-- Provide a clear and concise description of the problem you are experiencing. --> |
| 15 | + |
| 16 | + |
| 17 | +## Given the following reproduction Scenario |
| 18 | +<!-- Please provide example code that allows us to reproduce the issue. Do NOT paste screenshots of code! --> |
| 19 | + |
| 20 | +The issue happens when running this command: |
| 21 | +<!-- Adjust the below command as appropriate. --> |
| 22 | +```bash |
| 23 | +phpcs -ps file.php --standard=... |
| 24 | +``` |
| 25 | + |
| 26 | +... over a file containing this code: |
| 27 | +```php |
| 28 | +// Place your code sample here. |
| 29 | +``` |
| 30 | + |
| 31 | +<!-- Optionally post a *minimal* version of your custom ruleset here if needed to reproduce the issue. --> |
| 32 | +... with this custom ruleset: |
| 33 | +```xml |
| 34 | +<?xml version="1.0"?> |
| 35 | +<ruleset name="My Custom Standard"> |
| 36 | + ... |
| 37 | +</ruleset> |
| 38 | +``` |
| 39 | + |
| 40 | + |
| 41 | +### I'd expect the following behaviour |
| 42 | +<!-- What was the expected (correct) behavior? --> |
| 43 | + |
| 44 | + |
| 45 | +### Instead this happened |
| 46 | +<!-- |
| 47 | +What is the current (buggy) behavior? |
| 48 | +Please provide as much information as possible and relevant. |
| 49 | +
|
| 50 | +Whenever possible, include the error message and the error code for the sniff that is being |
| 51 | +(or should have been) triggered. |
| 52 | +You can see the sniff error codes by running `phpcs` with the `-s` flag. |
| 53 | +Example: `Universal.Arrays.DuplicateArrayKey.Found` |
| 54 | +--> |
| 55 | + |
| 56 | + |
| 57 | +## Environment |
| 58 | +<!-- |
| 59 | +Please include as many details as relevant about the environment you experienced the bug in. |
| 60 | +You should be able to get the version numbers using the `composer info` command. |
| 61 | +--> |
| 62 | + |
| 63 | +| Environment | Answer | |
| 64 | +| ----------------------- | ------------------------------------------------------------------------------ | |
| 65 | +| PHP version | x.y.z | |
| 66 | +| PHP_CodeSniffer version | x.y.z | |
| 67 | +| PHPCSExtra version | x.y.z | |
| 68 | +| PHPCSUtils version | x.y.z | |
| 69 | +| Install type | e.g. Composer global, Composer project local, git clone, other (please expand) | |
| 70 | + |
| 71 | + |
| 72 | +## Additional Context (optional) |
| 73 | +<!-- Add any other context about the problem here. --> |
| 74 | + |
| 75 | + |
| 76 | +## Tested Against `develop` branch? |
| 77 | + |
| 78 | +- [ ] I have verified the issue still exists in the `develop` branch of PHPCSExtra. |
0 commit comments