Skip to content
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

Copy the phpmd and phplint configs into the project directory #195

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ acquia:
# defaults/build.xml template.
phplint:
# Path to a file where each line is a pattern matching files to lint.
includesfile: "${build.thebuild.dir}/defaults/standard/phplint.txt"
includesfile: "phplint.txt"


# Configuration for using PHP_CodeSniffer to review code according to the Drupal coding
Expand Down Expand Up @@ -255,7 +255,7 @@ phpmd:
# Output format for phpmd.
format: text
# Comma-separated list of ruleset paths or names.
rulesets: "${build.thebuild.dir}/defaults/standard/phpmd.xml"
rulesets: "phpmd.xml"
# File extensions to review.
suffixes: php,inc,module,theme,profile,install,test

Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion defaults/standard/phpmd.xml → defaults/install/phpmd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<!--
Include each rule explicitly so we know what we have.
@see https://github.com/phpmd/phpmd/blob/master/src/main/resources/rulesets/

These checks can be run with "phing code-review".
@see "code-review" target in build.xml
-->

<!-- Clean Code -->
Expand Down Expand Up @@ -71,7 +74,6 @@
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/>
<!--
Hooks often have unused parameters, so ignore this warning.
@todo is there a way to allow unused parameters in hooks but not elsewhere?
<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/>
-->

Expand Down
12 changes: 9 additions & 3 deletions targets/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,15 @@
</filterchain>
</copy>

<!-- Copy other templates into place.
These copy commands use <expandproperties /> for property substitution.
-->
<!-- Copy the phpmd.xml file. -->
<copy file="${phing.dir.install}/../defaults/install/phpmd.xml" tofile="${application.startdir}/phpmd.xml" overwrite="true" />

<!-- Copy the phplint.txt file. -->
<copy file="${phing.dir.install}/../defaults/install/phplint.txt" tofile="${application.startdir}/phplint.txt" overwrite="true" />

<!-- Copy other templates into place.
These copy commands use <expandproperties /> for property substitution.
-->
<!-- Copy the behat template. -->
<copy file="${phing.dir.install}/../defaults/install/behat.yml" tofile="${application.startdir}/behat.yml" overwrite="true">
<filterchain>
Expand Down