Skip to content

Commit 47bd2a5

Browse files
authored
Merge branch 'master' into feature/support-generics
2 parents 92a93e8 + ee7034b commit 47bd2a5

File tree

1,417 files changed

+62459
-19125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,417 files changed

+62459
-19125
lines changed

.gitattributes

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
1-
.cspell.json export-ignore
2-
.gitattributes export-ignore
3-
.github/ export-ignore
4-
.gitignore export-ignore
5-
package.xml export-ignore
6-
phpcs.xml.dist export-ignore
7-
phpstan.neon export-ignore
8-
phpunit.xml.dist export-ignore
9-
scripts/ export-ignore
1+
#
2+
# Exclude these files from release archives.
3+
# This will also make them unavailable when using Composer with `--prefer-dist`.
4+
# If you develop for this repo using Composer, use `--prefer-source`.
5+
# https://www.reddit.com/r/PHP/comments/2jzp6k/i_dont_need_your_tests_in_my_production/
6+
# https://blog.madewithlove.be/post/gitattributes/
7+
#
8+
.github/ export-ignore
9+
scripts/ export-ignore
10+
.cspell.json export-ignore
11+
.gitattributes export-ignore
12+
.gitignore export-ignore
13+
.markdownlint-cli2.yaml export-ignore
14+
.remarkignore export-ignore
15+
.remarkrc export-ignore
16+
.yamllint.yml export-ignore
17+
phpcs.xml.dist export-ignore
18+
phpstan.neon.dist export-ignore
19+
phpunit.xml.dist export-ignore
1020

21+
#
1122
# Declare files that should always have CRLF line endings on checkout.
23+
#
1224
*WinTest.inc text eol=crlf
1325
*WinTest.php text eol=crlf
1426
src/Standards/Generic/Tests/Files/LineEndingsUnitTest*.inc text eol=crlf
27+
tests/Core/Fixer/Fixtures/GenerateDiffTest-WindowsLineEndings.inc text eol=crlf

.github/CONTRIBUTING.md

Lines changed: 447 additions & 0 deletions
Large diffs are not rendered by default.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,70 @@
22
name: Bug report
33
about: Create a report to help us improve
44
title: ''
5-
labels: ''
5+
labels: ['Status: triage', 'Type: bug']
66
assignees: ''
77

88
---
99

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+
1123
A clear and concise description of what the bug is.
1224

13-
**Code sample**
25+
### Code sample
1426
```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!";
1629
```
1730

18-
**Custom ruleset**
31+
### Custom ruleset
1932
```xml
2033
<?xml version="1.0"?>
2134
<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>
2336
</ruleset>
2437
```
2538

26-
**To reproduce**
39+
### To reproduce
2740
Steps to reproduce the behavior:
2841
1. Create a file called `test.php` with the code sample above...
2942
2. Run `phpcs test.php ...`
3043
3. See error message displayed
31-
```
44+
```text
3245
PHPCS output here
3346
```
3447

35-
**Expected behavior**
48+
## Expected behavior
49+
3650
A clear and concise description of what you expected to happen.
3751

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
4363

44-
**Additional context**
4564
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.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Community Support
4+
url: https://github.com/PHPCSStandards/PHP_CodeSniffer/discussions?discussions_q=-category%3AAnnouncements
5+
about: Support questions belong in Discussions, not in the issue tracker.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Feature request
3+
about: I have a suggestion (and may want to implement it).
4+
title: ''
5+
labels: ['Status: triage', 'Type: enhancement']
6+
assignees: ''
7+
8+
---
9+
10+
## Is your feature request related to a problem?
11+
<!-- Please provide a clear and concise description of what the feature is which you'd like to see implemented. -->
12+
13+
## Describe the solution you'd like
14+
<!--
15+
A clear and concise description of what you want to happen.
16+
17+
Please include some code samples of what should be flagged and preferably also some
18+
code samples of what should *not* be flagged.
19+
-->
20+
21+
## Additional context (optional)
22+
<!-- Add any other context or screenshots about the feature request here. -->
23+
24+
- [ ] 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).
25+
- [ ] I intend to create a pull request to implement this feature.

.github/community-cc-list.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# PHP_CodeSniffer Community CC List
2+
3+
<!--
4+
This list will be used on select tickets to ping the wider PHP_CodeSniffer community for input.
5+
6+
If you want to be on this list, feel free to submit a PR to add yourself.
7+
If you want to be removed from the list, dito, submit a PR to remove yourself and it will be merged without questions.
8+
9+
PRs adding/removing other people to/from the list will only be merged if the people being added/removed leave a comment on the PR consenting to it.
10+
11+
When updating the list, please list GitHub handles in alphabetical order.
12+
13+
For more context, see https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/227
14+
-->
15+
16+
/cc @asispts @dingo-d @fredden @GaryJones @greg0ire @kukulich @michalbundyra @Ocramius @sirbrillig @stronk7 @weierophinney @wimg

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Dependabot configuration.
2+
#
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
open-pull-requests-limit: 5
13+
commit-message:
14+
prefix: "GH Actions:"
15+
labels:
16+
- "Type: chores/QA"

.github/labeler.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
version: 1
2+
appendOnly: true
3+
labels:
4+
- label: "Status: triage"
5+
draft: false
6+
author-can-merge: false
7+
8+
- label: "Core Component: Config & Ruleset & CLI options"
9+
draft: false
10+
files:
11+
- "src/Config.php$"
12+
- label: "Core Component: Config & Ruleset & CLI options"
13+
draft: false
14+
files:
15+
- "src/Ruleset.php$"
16+
- label: "Core Component: File"
17+
draft: false
18+
files:
19+
- "src/Files/.*"
20+
- label: "Core Component: Fixer"
21+
draft: false
22+
files:
23+
- "src/Fixer.php$"
24+
- label: "Core Component: Generators"
25+
draft: false
26+
files:
27+
- "src/Generators/.*"
28+
- label: "Core Component: Reports"
29+
draft: false
30+
files:
31+
- "src/Reports/.*"
32+
- label: "Core Component: Tokenizer"
33+
draft: false
34+
files:
35+
- "src/Tokenizers/.*"
36+
- label: "Core Component: Utils"
37+
draft: false
38+
files:
39+
- "src/Util/.*"
40+
41+
- label: "Focus: Comments/Docblocks"
42+
draft: false
43+
files:
44+
- "src/Standards/.*/Sniffs/Commenting/"
45+
- label: "Focus: Fixer Conflicts"
46+
draft: false
47+
body: ".* fixer conflict.*"
48+
49+
- label: "Standard: Generic"
50+
draft: false
51+
files:
52+
- "src/Standards/Generic/(Docs|Sniffs)/.*"
53+
- label: "Standard: MySource"
54+
draft: false
55+
files:
56+
- "src/Standards/MySource/(Docs|Sniffs)/.*"
57+
- label: "Standard: PEAR"
58+
draft: false
59+
files:
60+
- "src/Standards/PEAR/(Docs|Sniffs)/.*"
61+
- label: "Standard: PSR1"
62+
draft: false
63+
files:
64+
- "src/Standards/PSR1/(Docs|Sniffs)/.*"
65+
- label: "Standard: PSR2"
66+
draft: false
67+
files:
68+
- "src/Standards/PSR2/(Docs|Sniffs)/.*"
69+
- label: "Standard: PSR12"
70+
draft: false
71+
files:
72+
- "src/Standards/PSR12/(Docs|Sniffs)/.*"
73+
- label: "Standard: Squiz"
74+
draft: false
75+
files:
76+
- "src/Standards/Squiz/(Docs|Sniffs)/.*"
77+
- label: "Standard: Zend"
78+
draft: false
79+
files:
80+
- "src/Standards/Zend/(Docs|Sniffs)/.*"
81+
82+
- label: "Type: breaking change"
83+
draft: false
84+
body: '[Xx]\] Breaking change'
85+
- label: "Type: bug"
86+
draft: false
87+
body: '[Xx]\] Bug fix'
88+
- label: "Type: enhancement"
89+
draft: false
90+
body: '[Xx]\] New feature'
91+
- label: "Type: documentation"
92+
draft: false
93+
body: '[Xx]\] Documentation improvement'
94+
- label: "Type: documentation"
95+
draft: false
96+
files:
97+
- 'src/Standards/.*/Docs/[A-Za-z0-9-]*/.*Standard.xml$'
98+
- label: "Type: documentation"
99+
draft: false
100+
files:
101+
- "*.md$"

.github/pull_request_template.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!-- Provide a general summary of your changes in the title above. -->
2+
3+
<!--
4+
Please target the `master` branch when submitting your pull request, unless your change **only** applies to PHPCS 4.x.
5+
-->
6+
7+
# Description
8+
<!--
9+
What do you want to achieve with this PR? Why did you write this code? What problem does this PR solve?
10+
Describe your changes in detail and, if relevant, explain which choices you have made and why.
11+
-->
12+
13+
14+
## Suggested changelog entry
15+
<!--
16+
Please provide a short description of the change for the changelog.
17+
This is only needed when this is an end-user, integrators or external standard maintainers facing change.
18+
-->
19+
20+
21+
## Related issues/external references
22+
23+
Fixes #
24+
25+
26+
## Types of changes
27+
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
28+
- [ ] Bug fix _(non-breaking change which fixes an issue)_
29+
- [ ] New feature _(non-breaking change which adds functionality)_
30+
- [ ] Breaking change _(fix or feature that would cause existing functionality to change)_
31+
- [ ] This change is only breaking for integrators, not for external standards or end-users.
32+
- [ ] Documentation improvement
33+
34+
35+
## PR checklist
36+
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
37+
- [ ] I have checked there is no other PR open for the same change.
38+
- [ ] I have read the [Contribution Guidelines](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/.github/CONTRIBUTING.md).
39+
- [ ] I grant the project the right to include and distribute the code under the BSD-3-Clause license (and I have the right to grant these rights).
40+
- [ ] I have added tests to cover my changes.
41+
- [ ] I have verified that the code complies with the projects coding standards.
42+
- [ ] \[Required for new sniffs\] I have added XML documentation for the sniff.
43+
44+
<!--
45+
============================================================================================
46+
Please make sure your pull request passes all continuous integration checks!
47+
48+
PRs which are failing their CI checks will likely be ignored by the maintainers.
49+
50+
Small PRs using atomic, descriptive commits are hugely appreciated as it will make
51+
reviewing your changes easier for the maintainers.
52+
============================================================================================
53+
-->

0 commit comments

Comments
 (0)