Merge "Convert content.externallinks.css to less"
[lhc/web/wiklou.git] / .phpcs.xml
1 <?xml version="1.0"?>
2 <ruleset name="MediaWiki">
3 <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
4 <exclude name="Generic.ControlStructures.InlineControlStructure" />
5 <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
6 <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
7 <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
8 <exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
9 <exclude name="MediaWiki.Commenting.FunctionComment.ExtraParamComment" />
10 <exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" />
11 <exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentStart" />
12 <exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentEnd" />
13 <exclude name="MediaWiki.Commenting.LicenseComment.InvalidLicenseTag" />
14 <exclude name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures" />
15 <exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
16 <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
17 <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment" />
18 <exclude name="MediaWiki.Usage.DbrQueryUsage.DbrQueryFound" />
19 <exclude name="MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage" />
20 <exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase" />
21 <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
22 <exclude name="MediaWiki.VariableAnalysis.ForbiddenGlobalVariables.ForbiddenGlobal$wgTitle" />
23 <exclude name="Squiz.Scope.MethodScope.Missing" />
24 <exclude name="Squiz.Scope.MemberVarScope.Missing" />
25 <exclude name="MediaWiki.Commenting.MissingCovers.MissingCovers" />
26 </rule>
27 <rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions">
28 <properties>
29 <!--
30 includes/compat/normal/UtfNormalUtil.php
31 * codepointToUtf8
32 * escapeSingleString
33 * hexSequenceToUtf8
34 * utf8ToCodepoint
35 * utf8ToHexSequence
36 includes/GlobalFunctions.php
37 * mimeTypeMatch
38 maintenance/benchmarks/bench_strtr_str_replace.php
39 * bfNormalizeTitleStrReplace
40 * bfNormalizeTitleStrTr
41 maintenance/cdb.php
42 * cdbShowHelp
43 maintenance/language/transstat.php
44 * showUsage
45 maintenance/mcc.php
46 * mccGetHelp
47 * mccShowUsage
48 maintenance/storage/moveToExternal.php
49 * moveToExternal
50 maintenance/storage/resolveStubs.php
51 * resolveStub
52 * resolveStubs
53 profileinfo.php
54 * compare_point
55 * getEscapedProfileUrl
56 tests/phpunit/includes/HooksTest.php
57 * NothingFunction
58 * NothingFunctionData
59 tests/qunit/data/styleTest.css.php
60 * cssfilter
61 -->
62 <property name="ignoreList" type="array" value="bfNormalizeTitleStrReplace,bfNormalizeTitleStrTr,cdbShowHelp,codepointToUtf8,compare_point,cssfilter,escapeSingleString,getEscapedProfileUrl,hexSequenceToUtf8,mccGetHelp,mccShowUsage,mimeTypeMatch,moveToExternal,NothingFunction,NothingFunctionData,resolveStub,resolveStubs,showUsage,utf8ToCodepoint,utf8ToHexSequence" />
63 </properties>
64 </rule>
65 <rule ref="MediaWiki.NamingConventions.ValidGlobalName">
66 <properties>
67 <property name="ignoreList" type="array" value="$IP,$messageMemc,$parserMemc" />
68 </properties>
69 </rule>
70 <rule ref="Generic.Files.LineLength">
71 <exclude-pattern>*/languages/messages/Messages*\.php</exclude-pattern>
72 </rule>
73 <rule ref="Generic.Files.OneObjectStructurePerFile.MultipleFound">
74 <!--
75 Whitelist existing violations, but enable the sniff to prevent
76 any new occurrences.
77 -->
78 <exclude-pattern>*/includes/actions/HistoryAction\.php</exclude-pattern>
79 <exclude-pattern>*/includes/api/ApiErrorFormatter\.php</exclude-pattern>
80 <exclude-pattern>*/includes/api/ApiImport\.php</exclude-pattern>
81 <exclude-pattern>*/includes/api/ApiMessage\.php</exclude-pattern>
82 <exclude-pattern>*/includes/api/ApiOpenSearch\.php</exclude-pattern>
83 <exclude-pattern>*/includes/api/ApiRsd\.php</exclude-pattern>
84 <exclude-pattern>*/includes/api/ApiUsageException\.php</exclude-pattern>
85 <exclude-pattern>*/includes/auth/AuthManagerAuthPlugin\.php</exclude-pattern>
86 <exclude-pattern>*/includes/AuthPlugin\.php</exclude-pattern>
87 <exclude-pattern>*/includes/cache/CacheDependency\.php</exclude-pattern>
88 <exclude-pattern>*/includes/cache/CacheHelper\.php</exclude-pattern>
89 <exclude-pattern>*/includes/deferred/CdnCacheUpdate\.php</exclude-pattern>
90 <exclude-pattern>*/includes/diff/DairikiDiff\.php</exclude-pattern>
91 <exclude-pattern>*/includes/diff/DiffEngine\.php</exclude-pattern>
92 <exclude-pattern>*/includes/exception/LocalizedException\.php</exclude-pattern>
93 <exclude-pattern>*/includes/Feed\.php</exclude-pattern>
94 <exclude-pattern>*/includes/filerepo/file/LocalFile\.php</exclude-pattern>
95 <exclude-pattern>*/includes/gallery/PackedOverlayImageGallery\.php</exclude-pattern>
96 <exclude-pattern>*/includes/HistoryBlob\.php</exclude-pattern>
97 <exclude-pattern>*/includes/htmlform/HTMLFormElement\.php</exclude-pattern>
98 <exclude-pattern>*/includes/jobqueue/aggregator/JobQueueAggregator\.php</exclude-pattern>
99 <exclude-pattern>*/includes/jobqueue/JobQueue\.php</exclude-pattern>
100 <exclude-pattern>*/includes/jobqueue/JobSpecification\.php</exclude-pattern>
101 <exclude-pattern>*/includes/libs/filebackend/FileBackendStore\.php</exclude-pattern>
102 <exclude-pattern>*/includes/libs/filebackend/FSFileBackend\.php</exclude-pattern>
103 <exclude-pattern>*/includes/libs/filebackend/SwiftFileBackend\.php</exclude-pattern>
104 <exclude-pattern>*/includes/logging/LogEntry\.php</exclude-pattern>
105 <exclude-pattern>*/includes/logging/LogFormatter\.php</exclude-pattern>
106 <exclude-pattern>*/includes/media/MediaTransformOutput\.php</exclude-pattern>
107 <exclude-pattern>*/includes/media/SVGMetadataExtractor\.php</exclude-pattern>
108 <exclude-pattern>*/includes/parser/Preprocessor_DOM\.php</exclude-pattern>
109 <exclude-pattern>*/includes/parser/Preprocessor_Hash\.php</exclude-pattern>
110 <exclude-pattern>*/includes/parser/Preprocessor\.php</exclude-pattern>
111 <exclude-pattern>*/includes/PathRouter\.php</exclude-pattern>
112 <exclude-pattern>*/includes/poolcounter/PoolCounter\.php</exclude-pattern>
113 <exclude-pattern>*/includes/PrefixSearch\.php</exclude-pattern>
114 <exclude-pattern>*/includes/profiler/SectionProfiler\.php</exclude-pattern>
115 <exclude-pattern>*/includes/RevisionList\.php</exclude-pattern>
116 <exclude-pattern>*/includes/search/SearchEngine\.php</exclude-pattern>
117 <exclude-pattern>*/includes/specialpage/LoginSignupSpecialPage\.php</exclude-pattern>
118 <exclude-pattern>*/includes/specialpage/RedirectSpecialPage\.php</exclude-pattern>
119 <exclude-pattern>*/includes/specials/SpecialListusers\.php</exclude-pattern>
120 <exclude-pattern>*/includes/specials/SpecialMyRedirectPages\.php</exclude-pattern>
121 <exclude-pattern>*/includes/specials/SpecialUploadStash\.php</exclude-pattern>
122 <exclude-pattern>*/includes/StubObject\.php</exclude-pattern>
123 <exclude-pattern>*/includes/upload/UploadFromChunks\.php</exclude-pattern>
124 <exclude-pattern>*/includes/upload/UploadStash\.php</exclude-pattern>
125 <exclude-pattern>*/includes/utils/AutoloadGenerator\.php</exclude-pattern>
126 <exclude-pattern>*/includes/WebResponse\.php</exclude-pattern>
127 <exclude-pattern>*/maintenance/dumpIterator\.php</exclude-pattern>
128 <exclude-pattern>*/maintenance/Maintenance\.php</exclude-pattern>
129 <exclude-pattern>*/maintenance/findDeprecated\.php</exclude-pattern>
130 <exclude-pattern>*/maintenance/storage/recompressTracked\.php</exclude-pattern>
131 <exclude-pattern>*/maintenance/preprocessorFuzzTest\.php</exclude-pattern>
132 <exclude-pattern>*/maintenance/language/languages.inc</exclude-pattern>
133 <exclude-pattern>*/maintenance/language/StatOutputs\.php</exclude-pattern>
134 <exclude-pattern>*/maintenance/language/checkLanguage.inc</exclude-pattern>
135 <exclude-pattern>*/maintenance/language/generateCollationData\.php</exclude-pattern>
136 <exclude-pattern>*/maintenance/term/MWTerm\.php</exclude-pattern>
137 <!-- Language converters use the pattern of 2 classes in one file -->
138 <exclude-pattern>*/languages/*\.php</exclude-pattern>
139 <!-- We don't care that much about violations in tests -->
140 <exclude-pattern>*/tests/*\.php</exclude-pattern>
141 </rule>
142 <rule ref="PSR2.Methods.MethodDeclaration.Underscore">
143 <exclude-pattern>*/includes/StubObject\.php</exclude-pattern>
144 </rule>
145 <rule ref="MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn">
146 <exclude-pattern>*/tests/phpunit/*\.php</exclude-pattern>
147 </rule>
148 <file>.</file>
149 <arg name="encoding" value="UTF-8"/>
150 <arg name="extensions" value="php,php5,inc,sample"/>
151 <exclude-pattern type="relative">^extensions/</exclude-pattern>
152 <exclude-pattern type="relative">^skins/</exclude-pattern>
153 <exclude-pattern>AdminSettings\.php</exclude-pattern>
154 <exclude-pattern>LocalSettings\.php</exclude-pattern>
155 <exclude-pattern>StartProfiler\.php</exclude-pattern>
156 </ruleset>