@@ -6,13 +6,15 @@ COVERAGE_OUTPUT_STYLE ?= html
6
6
BUILD_DIRECTORY ?= build
7
7
REPORTS_DIRECTORY ?= ${BUILD_DIRECTORY}/reports
8
8
COVERAGE_DIRECTORY ?= ${BUILD_DIRECTORY}/coverage
9
+ BEHAT_COVERAGE_DIRECTORY ?= ${BUILD_DIRECTORY}/behat-coverage
9
10
COVERAGE_CLOVER_FILE_PATH ?= ${COVERAGE_DIRECTORY}/clover.xml
10
11
11
12
# # Commands options
12
13
# ## Composer
13
14
# COMPOSER_OPTIONS=
14
15
# ## Phpcs
15
16
PHPCS_REPORT_STYLE ?= full
17
+ PHPCS_DISABLE_WARNING ?= "false"
16
18
# PHPCS_REPORT_FILE=
17
19
# PHPCS_REPORT_FILE_OPTION=
18
20
@@ -51,6 +53,12 @@ ifneq ("${PHPCS_REPORT_FILE}","")
51
53
PHPCS_REPORT_FILE_OPTION ?= --report-file=${PHPCS_REPORT_FILE}
52
54
endif
53
55
56
+ ifneq ("${PHPCS_DISABLE_WARNING}","true")
57
+ PHPCS_DISABLE_WARNING_OPTION=
58
+ else
59
+ PHPCS_DISABLE_WARNING_OPTION=-n
60
+ endif
61
+
54
62
55
63
# # Project build (install and configure)
56
64
build : install configure
@@ -76,20 +84,26 @@ test-functional:
76
84
./vendor/bin/behat ${BEHAT_COLOR_OPTION} ${BEHAT_OUTPUT_STYLE_OPTION} --no-snippets
77
85
78
86
codestyle : create-reports-directory
79
- ./vendor/bin/phpcs --standard=phpcs.xml.dist ${PHPCS_COLOR_OPTION} ${PHPCS_REPORT_FILE_OPTION} --report=${PHPCS_REPORT_STYLE}
87
+ ./vendor/bin/phpcs ${PHPCS_DISABLE_WARNING_OPTION} --standard=phpcs.xml.dist ${PHPCS_COLOR_OPTION} ${PHPCS_REPORT_FILE_OPTION} --report=${PHPCS_REPORT_STYLE}
80
88
81
89
coverage : create-coverage-directory
82
90
./vendor/bin/phpunit ${PHPUNIT_COLOR_OPTION} ${PHPUNIT_OUTPUT_STYLE_OPTION} ${PHPUNIT_COVERAGE_OPTION}
83
91
92
+ behat-coverage : create-behat-coverage-directory
93
+ composer required leanphp/behat-code-coverage
94
+ ./vendor/bin/behat ${BEHAT_COLOR_OPTION} ${BEHAT_OUTPUT_STYLE_OPTION} --no-snippets --profile coverage
84
95
85
96
86
97
# Internal commands
87
98
create-coverage-directory :
88
99
mkdir -p ${COVERAGE_DIRECTORY}
89
100
101
+ create-behat-coverage-directory :
102
+ mkdir -p ${BEHAT_COVERAGE_DIRECTORY}
103
+
90
104
create-reports-directory :
91
105
mkdir -p ${REPORTS_DIRECTORY}
92
106
93
107
94
- .PHONY : build install configure test test-technical test-functional codestyle coverage create-coverage-directory create-reports-directory
108
+ .PHONY : build install configure test test-technical test-functional codestyle coverage behat-coverage create-coverage-directory create-behat -coverage-directory create-reports-directory
95
109
.DEFAULT : build
0 commit comments