-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Custom config for testing PHP-MD codesize rules in the pipelines #501
Open
hectoras
wants to merge
13
commits into
develop
Choose a base branch
from
experimental/phpmd-ci-checks
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ef98947
feat: Add PHP-MD step in the pipelines
hectoras 391fe21
chore: Remove the noise from other linter tests
hectoras d6e743b
feat: Run cyclomatic complexity checks only on changed files
hectoras c42f4d7
chore: Debug
hectoras a057585
chore: Define PHPMD rules in tao-extension-ci-action instead
hectoras 6297a18
chore: Prevent PSR12 erorrs from stopping the PHPMD checks
hectoras b3fcd22
chore: Trigger pipelines
hectoras 088d204
chore: Trigger pipelines again
hectoras e0e8ca2
chore: Let's now lower the cyclomatic complexity
hectoras c9aa45c
chore: Let's now make it break again
hectoras 4ef9f9a
chore: Let's now make no changes and see it still breaking
hectoras 232867e
chore: Check providing the phpmd config in the extension
hectoras 8890660
chore: Tweak rules used by phpmd for this extension
hectoras File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,52 @@ | ||
<?xml version="1.0"?> | ||
<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 http://pmd.sf.net/ruleset_xml_schema.xsd" | ||
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> | ||
|
||
<!-- | ||
Reporting thresholds here have been tweaked for taoMediaManager, | ||
setting them to values higher than those in tao-extension-ci-action. | ||
|
||
Please consider lowering these values and fixing the reported issues | ||
if possible. | ||
|
||
You can run PHPMD checks locally with: | ||
"find . -iname '*.php' -exec phpmd {} text ./phpmd-ruleset.xml \;" | ||
--> | ||
|
||
<rule ref="rulesets/codesize.xml/CyclomaticComplexity"> | ||
<properties> | ||
<property name="reportLevel" value="18" /> | ||
</properties>--> | ||
</rule> | ||
<rule ref="rulesets/codesize.xml/NPathComplexity"> | ||
<properties> | ||
<property name="minimum" value="650" /> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"> | ||
<properties> | ||
<property name="minimum" value="200" /> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/codesize.xml/TooManyPublicMethods"> | ||
<properties> | ||
<property name="maxmethods" value="12" /> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/codesize.xml/ExcessivePublicCount"> | ||
<properties> | ||
<property name="maximum" value="11" /> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/codesize.xml/ExcessiveClassComplexity"> | ||
<properties> | ||
<property name="maximum" value="56" /> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/> | ||
<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/> | ||
<rule ref="rulesets/codesize.xml/TooManyFields"/> | ||
<rule ref="rulesets/codesize.xml/TooManyMethods"/> | ||
</ruleset> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets just revert this file and PR, we do not need this PR at all (just for testings)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, this was done so I was able to test it while I was working on the changes in the ci action
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only change we may want to keep is the custom ruleset I'm adding for tao mediamanager