-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request 'feature: integrated phpmd and baseline' (#4) from…
… introduce_phpmd into develop Reviewed-on: https://lab.sdo.sh/SDO/Seafile-PHP-SDK/pulls/4
- Loading branch information
Showing
6 changed files
with
108 additions
and
2 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
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 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,46 @@ | ||
<?xml version="1.0"?> | ||
<phpmd-baseline> | ||
<violation rule="PHPMD\Rule\Naming\ShortVariable" file="src/Resource/Avatar.php"/> | ||
<violation rule="PHPMD\Rule\CleanCode\BooleanArgumentFlag" file="src/Resource/Directory.php"/> | ||
<violation rule="PHPMD\Rule\CleanCode\BooleanArgumentFlag" file="src/Resource/File.php"/> | ||
<violation rule="PHPMD\Rule\CleanCode\ElseExpression" file="src/Resource/File.php"/> | ||
<violation rule="PHPMD\Rule\Naming\LongVariable" file="src/Resource/File.php"/> | ||
<violation rule="PHPMD\Rule\Naming\LongVariable" file="src/Resource/ShareLinks.php"/> | ||
<violation rule="PHPMD\Rule\Design\TooManyFields" file="src/Type/Account.php"/> | ||
<violation rule="PHPMD\Rule\Naming\ShortVariable" file="src/Type/Account.php"/> | ||
<violation rule="PHPMD\Rule\Naming\ShortVariable" file="src/Type/DirectoryItem.php"/> | ||
<violation rule="PHPMD\Rule\Naming\ShortVariable" file="src/Type/FileHistoryItem.php"/> | ||
<violation rule="PHPMD\Rule\Naming\ShortVariable" file="src/Type/Group.php"/> | ||
<violation rule="PHPMD\Rule\Naming\ShortVariable" file="src/Type/Library.php"/> | ||
<violation rule="PHPMD\Rule\CleanCode\StaticAccess" file="src/Type/Type.php"/> | ||
<violation rule="PHPMD\Rule\Controversial\Superglobals" file="test/functional/FunctionalTestCase.php" method="checkFunctionalTestsSetUpCorrectly"/> | ||
<violation rule="PHPMD\Rule\Controversial\Superglobals" file="test/functional/FunctionalTestCase.php" method="getClient"/> | ||
<violation rule="PHPMD\Rule\CleanCode\StaticAccess" file="test/functional/FunctionalTestCase.php"/> | ||
<violation rule="PHPMD\Rule\Controversial\Superglobals" file="test/functional/FunctionalTestCase.php" method="getFaker"/> | ||
<violation rule="PHPMD\Rule\Controversial\Superglobals" file="test/functional/FunctionalTestCase.php" method="getTestLibraryType"/> | ||
<violation rule="PHPMD\Rule\CleanCode\ElseExpression" file="test/functional/Resource/AccountTest.php"/> | ||
<violation rule="PHPMD\Rule\Controversial\Superglobals" file="test/functional/Resource/FileTest.php" method="testHistory"/> | ||
<violation rule="PHPMD\Rule\Controversial\Superglobals" file="test/functional/Resource/FileTest.php" method="testRename"/> | ||
<violation rule="PHPMD\Rule\UnusedLocalVariable" file="test/functional/Resource/FileTest.php"/> | ||
<violation rule="PHPMD\Rule\Controversial\Superglobals" file="test/functional/Resource/ShareLinksTest.php" method="testShareLinks"/> | ||
<violation rule="PHPMD\Rule\Naming\LongVariable" file="test/functional/Resource/ShareLinksTest.php"/> | ||
<violation rule="PHPMD\Rule\Naming\ShortVariable" file="test/functional/Resource/ShareLinksTest.php"/> | ||
<violation rule="PHPMD\Rule\CleanCode\ElseExpression" file="test/functional/Resource/ShareLinksTest.php"/> | ||
<violation rule="PHPMD\Rule\Naming\ShortVariable" file="test/unit/Resource/AvatarTest.php"/> | ||
<violation rule="PHPMD\Rule\Design\TooManyPublicMethods" file="test/unit/Resource/DirectoryTest.php"/> | ||
<violation rule="PHPMD\Rule\CleanCode\ElseExpression" file="test/unit/Resource/DirectoryTest.php"/> | ||
<violation rule="PHPMD\Rule\Design\TooManyMethods" file="test/unit/Resource/FileTest.php"/> | ||
<violation rule="PHPMD\Rule\Design\TooManyPublicMethods" file="test/unit/Resource/FileTest.php"/> | ||
<violation rule="PHPMD\Rule\Controversial\Superglobals" file="test/unit/Resource/FileTest.php" method="testDownloadFromDirFileExists"/> | ||
<violation rule="PHPMD\Rule\Controversial\Superglobals" file="test/unit/Resource/FileTest.php" method="testUpload"/> | ||
<violation rule="PHPMD\Rule\Controversial\Superglobals" file="test/unit/Resource/FileTest.php" method="testUpdate"/> | ||
<violation rule="PHPMD\Rule\Controversial\Superglobals" file="test/unit/Resource/FileTest.php" method="testUpdateMultiPartParams"/> | ||
<violation rule="PHPMD\Rule\Controversial\Superglobals" file="test/unit/Resource/FileTest.php" method="testUpdateMultiPartParamsNewFilename"/> | ||
<violation rule="PHPMD\Rule\Controversial\Superglobals" file="test/unit/Resource/FileTest.php" method="testUploadMultiPartParams"/> | ||
<violation rule="PHPMD\Rule\Design\TooManyPublicMethods" file="test/unit/Resource/LibraryTest.php"/> | ||
<violation rule="PHPMD\Rule\Naming\LongVariable" file="test/unit/Resource/ShareLinksTest.php"/> | ||
<violation rule="PHPMD\Rule\CleanCode\ElseExpression" file="test/unit/Resource/ShareLinksTest.php"/> | ||
<violation rule="PHPMD\Rule\CyclomaticComplexity" file="test/unit/Resource/StarredFileTest.php" method="testStar"/> | ||
<violation rule="PHPMD\Rule\CleanCode\BooleanArgumentFlag" file="test/unit/Stubs/FileResourceStub.php"/> | ||
<violation rule="PHPMD\Rule\CleanCode\StaticAccess" file="test/unit/Type/TypeUnitTest.php"/> | ||
</phpmd-baseline> |
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,50 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="PHPMD ruleset" | ||
xmlns="http://pmd.sf.net/ruleset/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 https://pmd.sf.net/ruleset_xml_schema.xsd" | ||
xsi:noNamespaceSchemaLocation="https://pmd.sf.net/ruleset_xml_schema.xsd"> | ||
<description>My PHPMD ruleset</description> | ||
|
||
<exclude-pattern>*/vendor/</exclude-pattern> | ||
|
||
<include-pattern>*/src/</include-pattern> | ||
<include-pattern>*/test/</include-pattern> | ||
|
||
<rule ref="rulesets/cleancode.xml/BooleanArgumentFlag" /> | ||
<rule ref="rulesets/cleancode.xml/ElseExpression" /> | ||
<rule ref="rulesets/cleancode.xml/StaticAccess" /> | ||
<rule ref="rulesets/codesize.xml/CyclomaticComplexity" /> | ||
<rule ref="rulesets/codesize.xml/NPathComplexity" /> | ||
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength" /> | ||
<rule ref="rulesets/codesize.xml/ExcessiveClassLength" /> | ||
<rule ref="rulesets/codesize.xml/ExcessiveParameterList" /> | ||
<rule ref="rulesets/codesize.xml/ExcessivePublicCount" /> | ||
<rule ref="rulesets/codesize.xml/TooManyFields" /> | ||
<rule ref="rulesets/codesize.xml/TooManyMethods" /> | ||
<rule ref="rulesets/codesize.xml/TooManyPublicMethods" /> | ||
<rule ref="rulesets/codesize.xml/ExcessiveClassComplexity" /> | ||
<rule ref="rulesets/controversial.xml/Superglobals" /> | ||
<rule ref="rulesets/controversial.xml/CamelCaseClassName" /> | ||
<rule ref="rulesets/controversial.xml/CamelCasePropertyName" /> | ||
<rule ref="rulesets/controversial.xml/CamelCaseMethodName" /> | ||
<rule ref="rulesets/controversial.xml/CamelCaseParameterName" /> | ||
<rule ref="rulesets/controversial.xml/CamelCaseVariableName" /> | ||
<rule ref="rulesets/design.xml/ExitExpression" /> | ||
<rule ref="rulesets/design.xml/EvalExpression" /> | ||
<rule ref="rulesets/design.xml/GotoStatement" /> | ||
<rule ref="rulesets/design.xml/NumberOfChildren" /> | ||
<rule ref="rulesets/design.xml/DepthOfInheritance" /> | ||
<rule ref="rulesets/design.xml/CouplingBetweenObjects" /> | ||
<rule ref="rulesets/design.xml/DevelopmentCodeFragment" /> | ||
<rule ref="rulesets/naming.xml/ShortVariable" /> | ||
<rule ref="rulesets/naming.xml/LongVariable" /> | ||
<rule ref="rulesets/naming.xml/ShortMethodName" /> | ||
<rule ref="rulesets/naming.xml/ConstructorWithNameAsEnclosingClass" /> | ||
<rule ref="rulesets/naming.xml/ConstantNamingConventions" /> | ||
<rule ref="rulesets/naming.xml/BooleanGetMethodName" /> | ||
<rule ref="rulesets/unusedcode.xml/UnusedPrivateField" /> | ||
<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable" /> | ||
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod" /> | ||
<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter" /> | ||
</ruleset> |