forked from emaijala/MLInvoice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
46 lines (40 loc) · 2.38 KB
/
build.xml
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-fixer-rules" value="no_spaces_after_function_name,no_trailing_whitespace,no_unused_imports,lowercase_keywords,encoding,no_spaces_inside_parenthesis,no_closing_tag,visibility_required,no_empty_statement,no_extra_consecutive_blank_lines,no_blank_lines_after_class_opening,no_blank_lines_after_phpdoc,binary_operator_spaces,no_singleline_whitespace_before_semicolons,ternary_operator_spaces,phpdoc_no_access,no_leading_import_slash" />
<property name="php-cs-fixer-extra-params" value=""/>
<!-- Travis Tasks -->
<target name="travis" description="Travis tasks">
<!-- Call standard tasks -->
<phingcall target="eslint"/>
<phingcall target="phpcs-n"/>
<phingcall target="php-cs-fixer-dryrun"/>
</target>
<!-- eslint -->
<target name="eslint">
<exec command="eslint js/functions.js js/mlinvoice.js js/stock_balance.js" escape="false" checkreturn="true" passthru="true" />
</target>
<target name="eslint-fix">
<exec command="eslint js/functions.js js/mlinvoice.js js/stock_balance.js --fix" escape="false" checkreturn="true" passthru="true" />
</target>
<!-- PHP CodeSniffer -->
<target name="phpcs">
<exec command="vendor/bin/phpcs --standard=tests/phpcs-ruleset.xml *.php" passthru="true" escape="false" checkreturn="true" />
</target>
<!-- PHP CodeSniffer without warnings-->
<target name="phpcs-n">
<exec command="vendor/bin/phpcs --standard=tests/phpcs-ruleset.xml -n *.php" passthru="true" escape="false" checkreturn="true" />
</target>
<!-- phpcbf -->
<target name="phpcbf">
<exec command="vendor/bin/phpcbf --standard=tests/phpcs-ruleset.xml *.php" passthru="true" escape="false"/>
</target>
<!-- php-cs-fixer (first task applies fixes, second task simply checks if they are needed) -->
<target name="php-cs-fixer">
<exec command="vendor/bin/php-cs-fixer fix --rules=${php-cs-fixer-rules} -vvv ${php-cs-fixer-extra-params} ." passthru="true" escape="false" />
</target>
<target name="php-cs-fixer-dryrun">
<exec command="vendor/bin/php-cs-fixer fix --rules=${php-cs-fixer-rules} --dry-run -vvv --diff ${php-cs-fixer-extra-params} ." passthru="true" escape="false" checkreturn="true" />
</target>
</project>