<ruleset name="MediaWiki">
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="Generic.ControlStructures.InlineControlStructure" />
- <exclude name="MediaWiki.Commenting.FunctionAnnotations.UnrecognizedAnnotation" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
<exclude name="MediaWiki.Commenting.FunctionComment.ExtraParamComment" />
<exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" />
- <exclude name="MediaWiki.Commenting.PhpunitAnnotations.NotClassTrait" />
<exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentStart" />
<exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentEnd" />
<exclude name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures" />
Whitelist existing violations, but enable the sniff to prevent
any new occurrences.
-->
- <exclude-pattern>*/includes/media/XCF\.php</exclude-pattern>
<exclude-pattern>*/includes/Feed\.php</exclude-pattern>
- <exclude-pattern>*/includes/libs/xmp/XMP\.php</exclude-pattern>
<exclude-pattern>*/includes/jobqueue/JobSpecification\.php</exclude-pattern>
<exclude-pattern>*/includes/RevisionList\.php</exclude-pattern>
<exclude-pattern>*/includes/installer/PhpBugTests\.php</exclude-pattern>
<exclude-pattern>*/profileinfo\.php</exclude-pattern>
<!-- Language converters use the pattern of 2 classes in one file -->
<exclude-pattern>*/languages/*\.php</exclude-pattern>
- <!-- We don't care that much about violations in tests -->
- <exclude-pattern>*/tests/*\.php</exclude-pattern>
+ <!-- Skip violations in some tests for now -->
+ <exclude-pattern>*/tests/parser/*\.php</exclude-pattern>
+ <exclude-pattern>*/tests/phan/*\.php</exclude-pattern>
+ <exclude-pattern>*/tests/phpunit/maintenance/*\.php</exclude-pattern>
+ <exclude-pattern>*/tests/phpunit/bootstrap\.php</exclude-pattern>
+ <exclude-pattern>*/tests/phpunit/phpunit\.php</exclude-pattern>
</rule>
<rule ref="MediaWiki.Files.ClassMatchesFilename.WrongCase">
<!--
<exclude-pattern>*/maintenance/storage/checkStorage\.php</exclude-pattern>
<exclude-pattern>*/maintenance/storage/recompressTracked\.php</exclude-pattern>
<exclude-pattern>*/maintenance/storage/trackBlobs\.php</exclude-pattern>
- <!-- We don't care that much about violations in tests -->
- <exclude-pattern>*/tests/*\.php</exclude-pattern>
+ <!-- Skip violations in some tests for now -->
+ <exclude-pattern>*/tests/phpunit/includes/GlobalFunctions/*\.php</exclude-pattern>
+ <exclude-pattern>*/tests/phpunit/maintenance/*\.php</exclude-pattern>
</rule>
<rule ref="Generic.Files.OneObjectStructurePerFile.MultipleFound">
<exclude-pattern>*/includes/api/ApiMessage\.php</exclude-pattern>
<exclude-pattern>*/includes/api/ApiOpenSearch\.php</exclude-pattern>
<exclude-pattern>*/includes/api/ApiRsd\.php</exclude-pattern>
- <exclude-pattern>*/includes/api/ApiUsageException\.php</exclude-pattern>
<exclude-pattern>*/includes/AuthPlugin\.php</exclude-pattern>
<exclude-pattern>*/includes/cache/CacheDependency\.php</exclude-pattern>
<exclude-pattern>*/includes/cache/CacheHelper\.php</exclude-pattern>
<exclude-pattern>*/includes/libs/filebackend/FSFileBackend\.php</exclude-pattern>
<exclude-pattern>*/includes/shell/Command\.php</exclude-pattern>
<exclude-pattern>*/includes/shell/Shell\.php</exclude-pattern>
- <exclude-pattern>*/tests/phpunit/structure/StructureTest\.php</exclude-pattern>
- </rule>
- <rule ref="MediaWiki.Usage.ForbiddenFunctions.exec">
- <!--
- Whitelist existing violations, but enable the sniff to prevent
- any new occurrences.
- -->
- <exclude-pattern>*/tests/phpunit/structure/StructureTest\.php</exclude-pattern>
</rule>
<rule ref="MediaWiki.Usage.ForbiddenFunctions.popen">
<!--
<exclude-pattern>includes/export/DumpPipeOutput\.php</exclude-pattern>
<exclude-pattern>includes/resourceloader/ResourceLoaderImage\.php</exclude-pattern>
<exclude-pattern>includes/shell/Command\.php</exclude-pattern>
- <exclude-pattern>includes/tidy/RaggettExternal\.php</exclude-pattern>
<exclude-pattern>maintenance/dumpTextPass\.php</exclude-pattern>
<exclude-pattern>maintenance/mysql\.php</exclude-pattern>
<exclude-pattern>maintenance/storage/recompressTracked\.php</exclude-pattern>