forked from emaijala/MLInvoice
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
46 lines (41 loc) · 2.02 KB
/
build.xml
File metadata and controls
46 lines (41 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding="UTF-8"?>
<project name="MLInvoice" basedir="." default="main">
<property name="tmp" value="/tmp" />
<property name="package" value="${phing.project.name}" override="true" />
<property name="php-cs-fixers" value="no_blank_lines_before_namespaces,function_call_space,trailing_spaces,unused_use,lowercase_keywords,encoding,parenthesis,php_closing_tag,visibility,duplicate_semicolon,extra_empty_lines,no_blank_lines_after_class_opening,no_empty_lines_after_phpdocs,operators_spaces,spaces_before_semicolon,ternary_spaces,concat_with_spaces,short_array_syntax,phpdoc_no_access,remove_leading_slash_use,indentation,linefeed,single_quote" />
<fileset dir="." id="src.php">
<include name="*.php" />
</fileset>
<!-- Continuous Integration Tasks -->
<target name="ci-tasks" description="continuous integration tasks">
<!-- Call standard tasks -->
<phingcall target="phpcs"/>
<phingcall target="php-cs-fixer-dryrun"/>
</target>
<!-- PHP CodeSniffer -->
<target name="phpcs">
<foreach param="filename" target="run-phpcs">
<fileset refid="src.php"/>
</foreach>
</target>
<target name="run-phpcs">
<exec command="phpcs --standard=PEAR --extensions=php ${filename}" escape="false" />
</target>
<!-- php-cs-fixer (first task applies fixes, second task simply checks if they are needed) -->
<target name="php-cs-fixer">
<foreach param="filename" target="run-php-cs-fixer">
<fileset refid="src.php"/>
</foreach>
</target>
<target name="run-php-cs-fixer">
<exec command="php-cs-fixer fix ${filename} --fixers=${php-cs-fixers} --verbose" passthru="true" escape="false" />
</target>
<target name="php-cs-fixer-dryrun">
<foreach param="filename" target="run-php-cs-fixer-dryrun">
<fileset refid="src.php"/>
</foreach>
</target>
<target name="run-php-cs-fixer-dryrun">
<exec command="php-cs-fixer fix ${filename} --fixers=${php-cs-fixers} --dry-run --verbose --diff" passthru="true" escape="false" checkreturn="true" />
</target>
</project>