@@ -6,13 +6,15 @@ COVERAGE_OUTPUT_STYLE ?= html
66BUILD_DIRECTORY ?= build
77REPORTS_DIRECTORY ?= ${BUILD_DIRECTORY}/reports
88COVERAGE_DIRECTORY ?= ${BUILD_DIRECTORY}/coverage
9+ BEHAT_COVERAGE_DIRECTORY ?= ${BUILD_DIRECTORY}/behat-coverage
910COVERAGE_CLOVER_FILE_PATH ?= ${COVERAGE_DIRECTORY}/clover.xml
1011
1112# # Commands options
1213# ## Composer
1314# COMPOSER_OPTIONS=
1415# ## Phpcs
1516PHPCS_REPORT_STYLE ?= full
17+ PHPCS_DISABLE_WARNING ?= "false"
1618# PHPCS_REPORT_FILE=
1719# PHPCS_REPORT_FILE_OPTION=
1820
@@ -51,6 +53,12 @@ ifneq ("${PHPCS_REPORT_FILE}","")
5153 PHPCS_REPORT_FILE_OPTION ?= --report-file=${PHPCS_REPORT_FILE}
5254endif
5355
56+ ifneq ("${PHPCS_DISABLE_WARNING}","true")
57+ PHPCS_DISABLE_WARNING_OPTION=
58+ else
59+ PHPCS_DISABLE_WARNING_OPTION=-n
60+ endif
61+
5462
5563# # Project build (install and configure)
5664build : install configure
@@ -76,20 +84,26 @@ test-functional:
7684 ./vendor/bin/behat ${BEHAT_COLOR_OPTION} ${BEHAT_OUTPUT_STYLE_OPTION} --no-snippets
7785
7886codestyle : 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}
8088
8189coverage : create-coverage-directory
8290 ./vendor/bin/phpunit ${PHPUNIT_COLOR_OPTION} ${PHPUNIT_OUTPUT_STYLE_OPTION} ${PHPUNIT_COVERAGE_OPTION}
8391
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
8495
8596
8697# Internal commands
8798create-coverage-directory :
8899 mkdir -p ${COVERAGE_DIRECTORY}
89100
101+ create-behat-coverage-directory :
102+ mkdir -p ${BEHAT_COVERAGE_DIRECTORY}
103+
90104create-reports-directory :
91105 mkdir -p ${REPORTS_DIRECTORY}
92106
93107
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
95109.DEFAULT : build
0 commit comments