-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
443 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.PHONY: ci test cs phpunit phpcs stan psalm | ||
|
||
ci: test cs | ||
test: phpunit | ||
cs: phpcs stan psalm | ||
|
||
phpunit: | ||
ifdef filter | ||
php ../../../tests/phpunit/phpunit.php -c phpunit.xml.dist --filter $(filter) | ||
else | ||
php ../../../tests/phpunit/phpunit.php -c phpunit.xml.dist | ||
endif | ||
|
||
phpcs: | ||
vendor/bin/phpcs -p -s --standard=$(shell pwd)/phpcs.xml | ||
|
||
stan: | ||
vendor/bin/phpstan analyse --configuration=phpstan.neon --memory-limit=2G | ||
|
||
stan-baseline: | ||
vendor/bin/phpstan analyse --configuration=phpstan.neon --memory-limit=2G --generate-baseline | ||
|
||
psalm: | ||
vendor/bin/psalm --config=psalm.xml --no-diff | ||
|
||
psalm-baseline: | ||
vendor/bin/psalm --config=psalm.xml --set-baseline=psalm-baseline.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
<file>src/</file> | ||
<file>tests/</file> | ||
|
||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki"> | ||
<exclude name="Generic.Files.LineLength.TooLong" /> | ||
<exclude name="MediaWiki.Commenting.FunctionComment" /> | ||
<exclude name="MediaWiki.Commenting.PropertyDocumentation" /> | ||
<exclude name="MediaWiki.Commenting.FunctionAnnotations.UnrecognizedAnnotation" /> | ||
<exclude name="MediaWiki.Commenting.MissingCovers.MissingCovers" /> | ||
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment" /> | ||
<exclude name="MediaWiki.WhiteSpace.DisallowEmptyLineFunctions.NoEmptyLine" /> | ||
<exclude name="MediaWiki.WhiteSpace.SpaceAfterClosure.NoWhitespaceAfterClosure" /> | ||
<exclude name="MediaWiki.WhiteSpace.SameLineCatch.CatchNotOnSameLine" /> | ||
<exclude name="MediaWiki.Classes.UnusedUseStatement.UnusedUse" /> | ||
<exclude name="MediaWiki.Classes.UnsortedUseStatements.UnsortedUse" /> | ||
<exclude name="MediaWiki.Usage.StaticClosure.StaticClosure" /> | ||
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine" /> | ||
<exclude name="MediaWiki.ControlStructures.IfElseStructure.SpaceBeforeElse" /> | ||
</rule> | ||
|
||
<rule ref="Generic.Formatting.NoSpaceAfterCast" /> | ||
<rule ref="Generic.Metrics.CyclomaticComplexity" /> | ||
<rule ref="Generic.Metrics.NestingLevel" /> | ||
<rule ref="Generic.WhiteSpace.ScopeIndent" tabIndent="true"> | ||
<properties> | ||
<property name="ignoreIndentationTokens" type="array"> | ||
<element value="T_COMMENT"/> | ||
</property> | ||
</properties> | ||
</rule> | ||
<rule ref="Squiz.Operators.ValidLogicalOperators" /> | ||
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"> | ||
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification" /> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint"> | ||
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification" /> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Call to function is_array\\(\\) with MediaWiki\\\\ResourceLoader\\\\FilePath\\|string will always evaluate to false\\.$#" | ||
count: 1 | ||
path: src/ResourceLoaderSCSSModule.php | ||
|
||
- | ||
message: "#^Elseif branch is unreachable because previous condition is always true\\.$#" | ||
count: 1 | ||
path: src/ResourceLoaderSCSSModule.php | ||
|
||
- | ||
message: "#^Method SCSS\\\\ResourceLoaderSCSSModule\\:\\:collateStyleFilesByPosition\\(\\) should return array\\<array\\<string\\>\\> but returns array\\<string, array\\<int, MediaWiki\\\\ResourceLoader\\\\FilePath\\|string\\>\\>\\.$#" | ||
count: 1 | ||
path: src/ResourceLoaderSCSSModule.php | ||
|
||
- | ||
message: "#^Offset 'position' on \\*NEVER\\* on left side of \\?\\? always exists and is always null\\.$#" | ||
count: 1 | ||
path: src/ResourceLoaderSCSSModule.php |
Oops, something went wrong.