Skip to content

Commit

Permalink
Create ruleset.xml (#50)
Browse files Browse the repository at this point in the history
* Create ruleset.xml

* Rename ruleset.xml to phpmd-ruleset.xml

* Update phpmd.yml

* Update phpmd.yml

* Update phpmd.yml
  • Loading branch information
ajaycalicut17 authored Jan 1, 2025
1 parent c801df2 commit 3b33063
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/phpmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '42 8 * * 5'

permissions:
contents: read
Expand All @@ -47,7 +45,7 @@ jobs:
tools: phpmd

- name: Run PHPMD
run: phpmd . sarif cleancode,codesize,controversial,design,naming,unusedcode --reportfile phpmd-results.sarif
run: phpmd . sarif phpmd-ruleset.xml --reportfile phpmd-results.sarif
continue-on-error: true

- name: Upload analysis results to GitHub
Expand Down
10 changes: 10 additions & 0 deletions phpmd-ruleset.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<ruleset name="PHPMD rule set"
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">
<rule ref="rulesets/unusedcode.xml" />
</ruleset>

0 comments on commit 3b33063

Please sign in to comment.