MediaWiki-CodeSniffer
MediaWiki CodeSniffer Standards
|
Custom sniff that requires all classes, interfaces, traits, and enums in a codebase to have the same license doc tag. More...
Public Member Functions | |
register () | |
@inheritDoc | |
process (File $phpcsFile, $stackPtr) | |
@inheritDoc | |
Public Attributes | |
string | $license = '' |
Custom sniff that requires all classes, interfaces, traits, and enums in a codebase to have the same license doc tag.
Note this sniff doesn't do anything by default. You need to enable it in your .phpcs.xml if you want to use it: <rule ref="MediaWiki.Commenting.ClassLevelLicense"> <properties> <property name="license" value="GPL-2.0-or-later" > </properties> </rule>
Doing so makes the LicenseComment sniff obsolete. You might want to disable it: <exclude name="MediaWiki.Commenting.LicenseComment" >
@license GPL-2.0-or-later