Solved a problem when checking constructor's promoted properties that was leading to some false positives.
v3.4.4
Changed
Improved some internal moodle.Util.Docblocks helpers and uses.
Fixed
The @deprecated tag is allowed to be alone within PHPDoc blocks.
v3.4.3
Added
Add new moodle.Commenting.DocblockDescription sniff to check that all the artifacts (classes, interfaces, traits, ...) and functions PHPDoc blocks have some description.
Changed
The moodle.Commenting.MissingDocBlock sniff now also checks that constants are documented.
Fixed
Solved a problem with file-level PHPDoc blocks not controlling the required blank lines after it.
Fixed the PHPDoc block detection when multi-line PHP 8 attributes are used in the middle.
v3.4.2
Added
Add new moodle.Files.LangFilesOrdering sniff to check that lang files are sorted by key.
Add new moodle.Commenting.MissingDocBlock sniff to check that all the artifacts (classes, interfaces, traits, ...) and functions are documented.
Add new moodle.Commenting.VariableComment sniff to check that the @var tag and its types are used correctly.
Add new moodle.Commenting.ValidTag sniff to check that only allowed tags are used.
Add new moodle.Commenting.FileExpectedTags sniff to check that files or classes have the correct PHPDoc block with both @copyright and @license information.
The expected contents of the @license tag can be controlled both by the preferredLicenseRegex property in ruleset files or by the moodleLicenseRegex configuration option in phpcs.xml files and CLI invocations. Setting them to empty string disables the Sniff completely. By default, the "https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later" content is checked.
Note that all the moodle.Commenting sniffs above are part of the migration from moodle-local_moodlecheck to moodle-cs. You can find more information about the deprecation of the former and links to track the progress in the announcement in General developer forum.
Changed
Various reorganisations of tests, fixtures and utils affecting a number of sniffs.
v3.4.1
Fixed
Solved a problem with the moodle.Commenting.Package sniff when running against arbitrary (not Moodle based) directories.
Solved a problem when checking constructor's promoted properties that was leading to some false positives.
[v3.4.4] - 2024-03-29
Changed
Improved some internal moodle.Util.Docblocks helpers and uses.
Fixed
The @deprecated tag is allowed to be alone within PHPDoc blocks.
[v3.4.3] - 2024-03-27
Added
Add new moodle.Commenting.DocblockDescription sniff to check that all the artifacts (classes, interfaces, traits, ...) and functions PHPDoc blocks have some description.
Changed
The moodle.Commenting.MissingDocBlock sniff now also checks that constants are documented.
Fixed
Solved a problem with file-level PHPDoc blocks not controlling the required blank lines after it.
Fixed the PHPDoc block detection when multi-line PHP 8 attributes are used in the middle.
[v3.4.2] - 2024-03-21
Added
Add new moodle.Files.LangFilesOrdering sniff to check that lang files are sorted by key.
Add new moodle.Commenting.MissingDocBlock sniff to check that all the artifacts (classes, interfaces, traits, ...) and functions are documented.
Add new moodle.Commenting.VariableComment sniff to check that the @var tag and its types are used correctly.
Add new moodle.Commenting.ValidTag sniff to check that only allowed tags are used.
Add new moodle.Commenting.FileExpectedTags sniff to check that files or classes have the correct PHPDoc block with both @copyright and @license information.
The expected contents of the @license tag can be controlled both by the preferredLicenseRegex property in ruleset files or by the moodleLicenseRegex configuration option in phpcs.xml files and CLI invocations. Setting them to empty string disables the Sniff completely. By default, the "https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later" content is checked.
Note that all the moodle.Commenting sniffs above are part of the migration from moodle-local_moodlecheck to moodle-cs. You can find more information about the deprecation of the former and links to track the progress in the announcement in General developer forum.
Changed
Various reorganisations of tests, fixtures and utils affecting a number of sniffs.
[v3.4.1] - 2024-03-08
Fixed
Solved a problem with the moodle.Commenting.Package sniff when running against arbitrary (not Moodle based) directories.
[v3.4.0] - 2024-03-07
Added
Add new moodle.PHPUnit.TestCasesAbstract sniff to check that testcase classes are declared abstract.
Add new moodle.PHPUnit.TestClassesFinal sniff to check that test classes are declared final.
Add new moodle.Commenting.Package sniff to replace those present in moodle-local_moodlecheck.
Add new moodle.Commenting.Category sniffs to replace those present in moodle-local_moodlecheck.
New phpcs.xml.dist to enforce the coding style to follow by moodle-cs itself. Basically, PSR12 ruled. CI verified from now on.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps moodlehq/moodle-cs from 3.3.15 to 3.4.5.
Release notes
Sourced from moodlehq/moodle-cs's releases.
... (truncated)
Changelog
Sourced from moodlehq/moodle-cs's changelog.
... (truncated)
Commits
95d2abd
Prepare for v3.4.5 releasec09a624
Merge pull request #144 from andrewnicols/variableCommentOnConstructore7506b1
Properties should not be tested for regular constructors (Fixes #142)9b3b3cd
Prepare for v3.4.4 release1d63691
Merge pull request #140 from andrewnicols/missingDocblockDeprecatedb425006
Deprecated items do not need a description (#139)baeb6d5
Update docblock helpers to only pass pointers66d0f48
Prepare for v3.4.3 releaseab43d49
Add sniff to check for first line descriptions (#134) (#134)5af7ee0
Merge pull request #129 from andrewnicols/constantsDocumentedCheckDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show